home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / COMMUNIC / 0717.ZIP / MSKERM.DOC < prev    next >
Text File  |  1987-05-24  |  122KB  |  2,602 lines

  1. 1. MS-DOS KERMIT
  2.  
  3. ********
  4. This document is formatted as an ordinary, plain text ASCII disk file.  Typeset
  5. copies are available in the Kermit User Guide from Columbia University.
  6. ********
  7.  
  8. Program:        Daphne Tzoar and Jeff Damens (Columbia University),
  9.                 Joe R. Doupnik (Utah State University),
  10.                 James Harvey (Indiana/Purdue University),
  11.                 contributions by many others.
  12. Language:       Microsoft Macro Assembler (MASM)
  13. Documentation:  Frank da Cruz and Christine Gianone (Columbia University)
  14. Version:        2.29
  15. Date:           May 26, 1986
  16.  
  17.  
  18. Kermit-MS Capabilities At A Glance:
  19.  
  20.   Local operation:                   Yes
  21.   Remote operation:                  Yes
  22.   Transfers text files:              Yes
  23.   Transfers binary files:            Yes
  24.   Wildcard send:                     Yes
  25.   ^X/^Y interruption:                Yes
  26.   Filename collision avoidance:      Yes
  27.   Can time out:                      Yes
  28.   8th-bit prefixing:                 Yes
  29.   Repeat count prefixing:            Yes
  30.   Alternate block checks:            Yes
  31.   Terminal emulation:                Yes
  32.   Communication settings:            Yes
  33.   Transmit BREAK:                    Yes
  34.   IBM mainframe communication:       Yes
  35.   Transaction logging:               No
  36.   Session logging:                   Yes
  37.   Raw transmit:                      No
  38.   Act as server:                     Yes
  39.   Talk to server:                    Yes
  40.   Advanced server functions:         Yes
  41.   Advanced commands for servers:     Yes
  42.   Local file management:             Yes
  43.   Command/init files:                Yes
  44.   Command macros:                    Yes
  45.   Attribute packets:                 No
  46.   Extended-length packets:           No
  47.   Sliding windows:                   No
  48.  
  49. Kermit-MS is a program that implements the Kermit file  transfer  protocol  for
  50. the  IBM PC family, IBM compatibles, and several other machines using the Intel
  51. 8086 processor series (8088, 80286, etc) and operating system family (PC-DOS or
  52. MS-DOS, henceforth referred to collectively as MS-DOS or simply DOS).
  53.  
  54. Kermit-MS  version  2.29  runs  in  as  little  as  60K  of  memory  (about 55K
  55. contiguous), but will occupy up to 100K, if it can be found, for  extra  screen
  56. rollback memory.  It will also try to leave 24 Kbytes free for a second copy of
  57. COMMAND.COM which is needed for the SPACE command and  others.    Versions  not
  58. using screen rollback memory will not require the additional space.
  59.  
  60. On  the  IBM  PC,  Kermit-MS 2.29 performs almost complete emulation of the DEC
  61. VT-102 terminal at speeds up to 19,200 baud (lacking only smooth scrolling, 132
  62. column  mode, and ANSI printer control).  Much of the speed is accomplished via
  63. direct writes to screen memory, but this is done in a "TopView" aware manner to
  64. allow  successful operation in windowing environments like TopView, MS-Windows,
  65. and DesqView.  Speed is also due to direct  access  of  the  serial  port  UART
  66. (8250)  chip, with buffered, interrupt-driven receipt of characters and select-
  67. able XON/XOFF flow control.  Full-speed 9600  baud  operation  is  possible  on
  68. 4.77Mhz  systems  without  flow  control, but flow control is required on these
  69. systems for 19,200 baud or higher rates.
  70.  
  71. As of version 2.28, MS-DOS Kermit requires version 2.0 or later of DOS.   Older
  72. versions  of  IBM  PC Kermit are no longer distributed, but if you have version
  73. 2.27 or earlier, it can run under version 1.0 or 1.1 of PC-DOS.
  74.  
  75. Kermit-MS 2.29 runs on a wide variety of MS-DOS systems, including  the  entire
  76. IBM  PC  family  (the  PC,  XT, AT, PCjr, Portable PC, PC Convertible) and com-
  77. patibles (Compaq, Z150, etc), the DEC Rainbow, NEC APC, Sanyo MBC, Victor 9000,
  78. HP-110, HP-150, HP Portable Plus, and many others.
  79.  
  80. This  document  will  describe the things you should know about the MS-DOS file
  81. system in order to make effective use of Kermit, and then it will describe  the
  82. Kermit-MS  program  itself.   In system-specific areas like terminal emulation,
  83. most discussion focuses on the IBM PC version.  It is assumed you  are  already
  84. familiar  with the general ideas of Kermit file transfer.  If you are not, con-
  85. sult the Kermit User Guide, or Kermit,  A  File  Transfer  Protocol,  by  Frank
  86. da Cruz, Digital Press (1986).
  87.  
  88.  
  89. 1.1. The MS-DOS File System
  90.  
  91. The features of the MS-DOS file system of greatest interest to Kermit users are
  92. the form of the file specifications, and the formats of the files themselves.
  93.  
  94.  
  95. 1.1.1. File Specifications
  96.  
  97. MS-DOS file specifications (in version 2.0 or later of DOS) are of the form 
  98.  
  99.     DEVICE:\PATHNAME\NAME.TYPE
  100.  
  101. where the DEVICE is a single character identifier  (for  instance,  A  for  the
  102. first  floppy  disk,  C  for  the first fixed disk, D for a RAM disk emulator),
  103. PATHNAME is up to 63 characters of identifier(s) (up to 8 characters each) sur-
  104. rounded  by  reverse  slashes, NAME is an identifier of up to 8 characters, and
  105. TYPE is an identifier of up to 3 characters in length.  Device and pathname may
  106. be  omitted.    The  first  backslash  in  the  pathname  may be omitted if the
  107. specified path is relative to the current directory.  In the  path  field,  "."
  108. means  the  current  directory,  ".." means the parent directory.  Some DOS im-
  109. plementations (like Wang) may use slash "/" rather than backslash as  a  direc-
  110. tory separator.
  111.  
  112. Pathname  is  normally  omitted, but can be specified in all Kermit-MS commands
  113. (as of version 2.29).  Device and directory pathnames, when omitted, default to
  114. either  the  user's  current  disk  and  directory, or to the current directory
  115. search path as specified in the DOS PATH environment variable, depending on the
  116. context in which the file name appears.
  117.  
  118.     When  this  document  says  that a file is searched for "in the current
  119.     path," it means that the PATH is searched first, and if the file is not
  120.     found,  then Kermit-MS looks on the current disk and directory.  If the
  121.     PATH environment variable is empty, Kermit looks only  at  the  current
  122.     disk and directory.
  123.  
  124. NAME.TYPE  is  normally sufficient to specify a file, and only this information
  125. is sent along by Kermit-MS with an outgoing file.
  126.  
  127. The device, path, name, and type fields may contain uppercase letters,  digits,
  128. and the special characters "-" (dash), "_" (underscore), and "$" (dollar sign).
  129. When you type lowercase letters in filenames, they are converted  automatically
  130. to  uppercase.  There are no imbedded or trailing spaces.  Other characters may
  131. not be included; there is no mechanism for "quoting" otherwise illegal  charac-
  132. ters  in  filenames.  The fields of the file specification are set off from one
  133. another by the punctuation indicated above.
  134.  
  135. The name field is the primary identifier for the file.  The type,  also  called
  136. the  extension or suffix, is an indicator which, by convention, tells what kind
  137. of file we have.  For instance FOO.BAS is the source of a BASIC  program  named
  138. FOO;  FOO.OBJ  might  be  the  relocatable  object module produced by compiling
  139. FOO.BAS; FOO.EXE could be an executable program produced  by  loading  FOO.OBJ,
  140. and so forth.  .EXE and .COM are the normal suffixes for executable programs.
  141.  
  142. The  MS-DOS allows a group of files to be specified in a single file specifica-
  143. tion by including the special "wildcard"  characters,  "*"  and  "?".    A  "*"
  144. matches  any  string  of characters from the current position to the end of the
  145. field, including no characters at all; a  "?"  matches  any  single  character.
  146. Here are some examples:
  147.  
  148.   *.BAS   All  files of type BAS (all BASIC source files) in the current direc-
  149.           tory.
  150.  
  151.   FOO.*   Files of all types with name FOO.
  152.  
  153.   F*.*    All files whose names start with F.
  154.  
  155.   F?X*.*  All files whose names start with F and contain X in the  third  posi-
  156.           tion, followed by zero or more characters.
  157.  
  158.   *.?     All files whose types are exactly one character long.
  159.  
  160. Wildcard  notation  is used on many computer systems in similar ways, and it is
  161. the mechanism most commonly used to instruct Kermit to send a group of files.
  162.  
  163. Users of Kermit-MS should bear in mind that other (non-MS-DOS) systems may  use
  164. different wildcard characters.  For instance the DEC-20 uses "%" instead of "?"
  165. as the single character wildcard; when using Kermit-MS to  request  a  wildcard
  166. file  group from a Kermit-20 server, the DOS "?" must be replaced by the DEC-20
  167. "%".
  168.  
  169.  
  170. 1.1.2. File Formats
  171.  
  172. MS-DOS systems store files as bulk collections of 8-bit  bytes,  with  no  par-
  173. ticular  differences  between text, program code, and binary files.  ASCII text
  174. files consist of lines separated by carriage-return-linefeed sequences (CRLFs),
  175. which conforms exactly to the way Kermit represents text files during transmis-
  176. sion.  Since a non-MS-DOS receiving system might need to make  distinctions  as
  177. to file type, you may need to use various SET functions on the remote system to
  178. inform it that the incoming file is of some particular (non-default) type, such
  179. as  binary.    In  transmitting files between Kermit-MS programs, regardless of
  180. file contents, the receiving MS-DOS system is  equally  capable  of  processing
  181. text, code, and data, and in fact requires no knowledge of how the bytes in the
  182. file are to be used.  Unlike most other Kermit programs, MS-DOS Kermit does not
  183. require  a command like SET FILE TYPE BINARY to switch from text to binary file
  184. transfer.
  185.  
  186. MS-DOS (unlike CP/M) is capable of pinpointing the end of file  with  precision
  187. by  keeping  a  byte  count in the directory, so one would expect no particular
  188. confusion in this regard.  However, certain MS-DOS programs continue to use the
  189. CP/M  convention  of  terminating  a  text file with a Control-Z character, and
  190. won't operate correctly unless this terminating byte is  present.    Therefore,
  191. you  should be aware of a special SET EOF option for both incoming and outbound
  192. files, described later.
  193.  
  194. Non-MS-DOS systems may  well  be  confused  by  nonstandard  ASCII  files  from
  195. Kermit-MS:
  196.  
  197.    - Files  containing  any  of the 8-bit "extended ASCII" characters will
  198.      probably need conversion (or translation) to 7-bit ASCII.
  199.  
  200.    - Files produced by word processing programs like  Easywriter  or  Word
  201.      Star  may may contain special binary formatting codes, and could need
  202.      conversion to conventional 7-bit ASCII format prior to  transmission,
  203.      using commonly available "exporter" programs.
  204.  
  205.    - Files  created  by  word processors that store formatting data at the
  206.      end of the file, after the Control-Z and before physical end, may re-
  207.      quire  special  processing  via SET EOF to strip the formatting data,
  208.      lest they confuse non-MS-DOS recipients.
  209.  
  210.    - Spreadsheet or database files usually need special formatting  to  be
  211.      meaningful  to  non-MS-DOS recipients (though they can be transmitted
  212.      between MS-DOS systems with Kermit-MS).
  213.  
  214.  
  215. 1.2. Program Invocation
  216.  
  217. Kermit-MS can be run interactively, from a batch file, or as an "external"  DOS
  218. command.   Commands consist of one or more fields, separated by "whitespace" --
  219. one or more spaces or tabs.
  220.  
  221. Upon initial startup, the program executes  any  commands  found  in  the  file
  222. MSKERMIT.INI in the current path.  This initialization file may contain command
  223. macro definitions, communications settings for one or more ports, or any  other
  224. Kermit-MS commands.  Here is a sample MSKERMIT.INI file:
  225.  
  226. comment -- MSKERMIT.INI, MS-DOS Kermit initialization file
  227.  
  228. comment -- Don't overwrite my files!
  229.  set warning on
  230.  
  231. comment -- Define macros for the systems I use...
  232.  define unix set local-echo off, set flow xon, set timer off
  233.  def ibm set par odd, set loc on, set hands xon, set flo off, set tim on
  234.  def modem set port 2, set baud 1200
  235.  
  236. comment -- Define a macro for quickly adapting to noisy connections...
  237.  def noisy set block-check 3, set send packet-length 40, set retry 20
  238.  
  239. comment -- I always start out by connecting to my UNIX system...
  240.  set port 1
  241.  set baud 4800
  242.  do unix
  243.  connect
  244.  
  245.  
  246. Interactive Operation:
  247.  
  248. To  run  Kermit-MS  interactively, invoke the program from DOS command level by
  249. typing its name.  When you see the command's prompt, 
  250.  
  251.     Kermit-MS>
  252.  
  253. you may type Kermit commands  repeatedly  until  you  are  ready  to  exit  the
  254. program, for example:
  255.  
  256.     A>
  257.     A>kermit
  258.  
  259.     IBM PC Kermit-MS V2.29
  260.     Type ? for help
  261.  
  262.     Kermit-MS>send foo.*
  263.  
  264.       The files are sent.
  265.  
  266.     Kermit-MS>get bar.*
  267.  
  268.       The requested files are received.
  269.  
  270.     Kermit-MS>exit
  271.     A>
  272.  
  273. During  interactive operation, you may edit the command you're currently typing
  274. using BACKSPACE to erase the character most recently typed,  Ctrl-W  to  delete
  275. the  most  recent  field,  or Ctrl-U to delete the entire command.  The editing
  276. characters may be used in any combination until the command is finally  entered
  277. by typing RETURN (Carriage Return, Enter) or Ctrl-L.
  278.  
  279. While  typing  commands,  you  may the help ("?") and keyword completion  (ESC)
  280. features freely while typing Kermit-MS commands.  A question mark typed at  al-
  281. most any point in a command produces a brief description of what is expected or
  282. possible at that point (for this reason, Kermit-MS uses  "#"  for  the  single-
  283. character  match  wildcard in the first position of the local filenames and "?"
  284. thereafter, and ?-help is not available from within a filename).  ESC typed  at
  285. any  point,  except  in  a  local  filename, will cause the current field to be
  286. filled out if what you have typed so far is sufficient to identify it, and will
  287. leave you in position to type the next field (or to type a "?" to find out what
  288. the next field is); otherwise, the program will beep at you and wait for you to
  289. type further characters.
  290.  
  291. Some Kermit-MS commands, like GET, SHOW KEY, SET KEY, may prompt for additional
  292. information on subsequent lines.  If you have reached one of these prompts  and
  293. then wish to cancel the command, you may type Control-C.
  294.  
  295. Summary of Kermit-MS Command Editing Characters:
  296.  
  297.     SPACE   Separates fields within the command.
  298.  
  299.     TAB     Same  as  Space,  and echoes as Space.  You may also use Ctrl-I for
  300.             Tab.
  301.  
  302.     BACKSPACE
  303.             Deletes the character most recently typed.  May be typed repeatedly
  304.             to delete all the way back to the prompt.  You may also use DELETE,
  305.             RUBOUT, Ctrl-H, or equivalent keys.
  306.  
  307.     Ctrl-W  Deletes the most recent "word", or field, on the command line.  May
  308.             be typed repeatedly.
  309.  
  310.     Ctrl-U  Deletes the entire command line, back to the prompt.
  311.  
  312.     Ctrl-C  Cancels the current command and returns to the "Kermit-MS>" prompt.
  313.  
  314.     ESC     If enough characters have been supplied in the current  keyword  to
  315.             identify  it uniquely, supply the remainder of the field, and posi-
  316.             tion to the next field of the command.  Otherwise,  sound  a  beep.
  317.             ESC does not provide filename completion in version 2.29.
  318.  
  319.     ?       Displays  a  brief message describing what may be typed in the cur-
  320.             rent command field.  Also,  wildcard  character  for  matching  any
  321.             single character in all but the first position of a filename.
  322.  
  323.     #       Wildcard  character  for  matching  single characters in filenames.
  324.             Equivalent to MS-DOS "?", but used  in  the  first  position  of  a
  325.             filename only, so that "?" may be used to get help at the beginning
  326.             of a filename field.
  327.  
  328.     RETURN  Enters the command.  On most keyboards, you may also use  ENTER  or
  329.             Ctrl-M.
  330.  
  331.     Ctrl-L  Clears the screen and enters the command.
  332.  
  333. Liberal  use  of "?" allows you to feel your way through the commands and their
  334. fields.  This feature is sometimes called "menu on demand"  --  unlike  systems
  335. that  force  you to negotiate menus at every turn, menu-on-demand provides help
  336. only when it is needed.
  337.  
  338.  
  339. Command Line Invocation:
  340.  
  341. Kermit-MS may also be invoked with command  line  arguments  from  DOS  command
  342. level, for instance:
  343.  
  344.     A>kermit send foo.bar
  345.  
  346. or
  347.  
  348.     A>kermit set port 1, set baud 9600, connect
  349.  
  350. In  this case, help and completion  are not available (because the program that
  351. provides them won't start running until  after  you  type  the  entire  command
  352. line),  and Kermit-MS will exit back to DOS after completing the specified com-
  353. mand or commands.    Therefore,  when  invoked  with  command  line  arguments,
  354. Kermit-MS  will  behave as if it were an external DOS command, like MODE.  Note
  355. that several commands may be given on the command line, separated by commas.
  356.  
  357.  
  358. Batch Operation:
  359.  
  360. Like other MS-DOS programs, Kermit-MS may be operated under batch with  command
  361. line  arguments.   If you invoke it without command line arguments, it will run
  362. interactively, reading commands from the keyboard and not the batch file.  When
  363. it exits, batch processing will continue to the end of the batch file.
  364.  
  365.  
  366. Remote Operation:
  367.  
  368. The MS-DOS CTTY command allows an MS-DOS system to be used from a terminal con-
  369. nected to its communication port.  Such sessions must be conducted  with  great
  370. care, since many programs assume that they are running on the real console, and
  371. explicitly reference screen memory or keyboard scan codes.  Kermit can be  used
  372. in this manner too, but before you give it any file transfer commands, you must
  373. inform it that it is running in "remote mode" rather  than  its  normal  "local
  374. mode."    Use  the  SET REMOTE ON command for this purpose, to prevent the file
  375. transfer display from being sent out the port.
  376.  
  377.  
  378. 1.3. Kermit-MS Commands
  379.  
  380. MS-DOS Kermit implements a large subset of  the  commands  of  "ideal"  Kermit.
  381. Here's a brief summary:
  382.  
  383.           BYE  to remote server.
  384.         CLEAR  key redefinitions.
  385.         CLOSE  log file and stop logging remote session.
  386.       COMMENT  a command file.
  387.       CONNECT  as terminal to remote system.
  388.           CWD  change local working directory.
  389.        DEFINE  macros of Kermit-MS commands.
  390.        DELETE  local files.
  391.     DIRECTORY  listing of local files.
  392.            DO  a macro expansion.
  393.          EXIT  from Kermit-MS.
  394.        FINISH  Shut down remote server.
  395.           GET  remote files from server.
  396.        HANGUP  the phone.
  397.          HELP  about Kermit-MS.
  398.         LOCAL  prefix for local file management commands.
  399.           LOG  remote terminal session.
  400.        LOGOUT  remote server.
  401.          PUSH  to MS-DOS command level.
  402.          QUIT  from Kermit-MS
  403.       RECEIVE  files from remote Kermit.
  404.        REMOTE  prefix for remote file management commands.
  405.           RUN  an MS-DOS program.
  406.          SEND  files to remote Kermit.
  407.        SERVER  mode of remote operation.
  408.           SET  various parameters.
  409.          SHOW  various parameters.
  410.         SPACE  inquiry (about disk space).
  411.        STATUS  inquiry (about settings).
  412.          TAKE  commands from file.
  413.          TYPE  display a local file.
  414.       VERSION  display Kermit-MS program version number.
  415.  
  416. The  remainder  of  this section concentrates on the commands that have special
  417. form or meaning for MS-DOS Kermit.  Not  all  of  the  following  commands  are
  418. necessarily  available on all MS-DOS systems, and some of the commands may work
  419. somewhat differently between DOS versions.
  420.  
  421. The notation used is as follows: Optional  fields  are  in  [square  brackets],
  422. lists  of  alternatives  are in {curly braces}.  Parameters, such as numbers or
  423. filenames, are shown in italics (providing the printer is capable  of  printing
  424. italics),  and  in  dialog examples user typein is underlined (on printers that
  425. can show it) to distinguish it from computer typeout.
  426.  
  427.  
  428. 1.3.1. Commands for Terminal Connection
  429.  
  430. The CONNECT command connects your PC as a terminal to  the  remote  system,  so
  431. that you can start up Kermit there.
  432.  
  433.  
  434. The CONNECT Command
  435.  
  436. The  CONNECT command establishes an interactive terminal connection to the sys-
  437. tem connected to the currently selected communications port (e.g. COM1 or COM2)
  438. using  full duplex (remote) echoing and no parity unless otherwise specified in
  439. previous SET commands.  You can type the escape character followed by the  let-
  440. ter C to get back to Kermit-MS.  On most MS-DOS systems the escape character is
  441. Ctrl-] by default.
  442.  
  443. You can use the SET ESCAPE command to define a different escape character,  and
  444. on  most  systems  you can SET BAUD (or SPEED) to change the baud rate, and SET
  445. PORT to switch between ports.  Read about the SET COMMAND in section 1.3.6  for
  446. more information on these and other settings.
  447.  
  448. Terminal emulation is described in greater detail in section 1.4 below.
  449.  
  450.  
  451. The HANGUP Command
  452.  
  453. HANGUP command attempts to lower the modem signals DTR and RTS.  It may be used
  454. to hang up the phone when dialed up through a modem, or to get the attention of
  455. port contention units or terminal concentrators that operate in this manner.
  456.  
  457.  
  458. 1.3.2. Commands for File Transfer
  459.  
  460. The file transfer commands are SEND, GET, and RECEIVE.
  461.  
  462.  
  463. The SEND Command
  464.  
  465. Syntax:  SEND filespec1 [filespec2]
  466.  
  467. The  SEND  command causes a file or file group to be sent from the local MS-DOS
  468. system to the Kermit on the remote system.  The remote Kermit may be running in
  469. either  server or interactive mode; in the latter case, you should already have
  470. given it a RECEIVE command and escaped back to your PC.
  471.  
  472. filespec1 may contain the wildcard characters "*" to match zero or more charac-
  473. ters  within  a  field, and/or "#" (first position) or "?" (elsewhere) to match
  474. any single character.  If  filespec1  contains  wildcard  characters  then  all
  475. matching files will be sent, in the same order that MS-DOS would show them in a
  476. directory listing.  If filespec1  specifies  a  single  file,  you  may  direct
  477. Kermit-MS to send that file with a different name, given in filespec2.  For in-
  478. stance, in the command 
  479.  
  480.     Kermit-MS>send foo.bar framus.widget
  481.  
  482. filespec2 begins with the first nonblank character  after  filespec1  and  ends
  483. with  the  carriage return; thus it may contain blanks or other unusual charac-
  484. ters that may be appropriate on the target machine.   The  alphabetic  case  of
  485. text in filespec2 is preserved in transmission.
  486.  
  487. If  the  SEND command is specified by itself on the command line, then you will
  488. be prompted separately for the name of the file to send, and the name  to  send
  489. it under:
  490.  
  491.     Kermit-MS>send
  492.      Local Source File: c:\chris\xcom1.txt
  493.      Remote Destination File: com1.txt
  494.  
  495. If  a file can't be opened for read access, standard MS-DOS recovery procedures
  496. will take place.  For example:
  497.  
  498.     Not ready error reading drive A
  499.     Abort, Retry, Ignore?
  500.  
  501. If you select "Abort," you will be returned to DOS.
  502.  
  503. Files will be sent with  their  MS-DOS  filename  and  filetype  (for  instance
  504. FOO.TXT,  no  device or pathname).  If there is no filetype, then only the name
  505. will be sent, without the terminating dot.  Each file is sent as  is,  with  no
  506. conversions  done  on  the  data, except for possibly adding or deleting a ter-
  507. minating Control-Z character (see the SET EOF command).
  508.  
  509. Once you give Kermit-MS the SEND command, the name of each file  will  be  dis-
  510. played  on your screen as the transfer begins.  Packet, retry, and other counts
  511. will be displayed along with informational messages during the  transfer.    If
  512. the  file is successfully transferred, you will see "Complete", otherwise there
  513. will be an error message.  When the specified operation is  done,  the  program
  514. will sound a beep.
  515.  
  516. Several  single-character  commands  may  be  given while a file transfer is in
  517. progress:
  518.  
  519.   ^X  (Control-X) Stop sending the current file and go on to the next  one,  if
  520.       any.
  521.  
  522.   ^Z  Stop sending this file, and don't send any further files.
  523.  
  524.   ^C  Return to Kermit-MS command level immediately without sending any kind of
  525.       notification to the remote system.
  526.  
  527.   ^E  Like ^C, but send an Error packet to the remote Kermit in an  attempt  to
  528.       bring it back to server or interactive command level.
  529.  
  530.   CR  Simulate a timeout: resend the current packet, or NAK the expected one.
  531.  
  532. Control-X,  Control-Z,  and  Control-E send the proper protocol messages to the
  533. remote Kermit to bring it gracefully to the desired state.    Control-C  leaves
  534. the  remote  Kermit in whatever state it happens to be in, possibly retransmit-
  535. ting its last packet over and over, up to its retry limit.    You  should  only
  536. have  to  use  Control-C  in  dire emergencies (the remote Kermit is stuck, the
  537. remote system crashed, etc), or at those times when you realize that  you  have
  538. given a file transfer command to Kermit-MS without first having told the remote
  539. Kermit about it.
  540.  
  541.  
  542. The RECEIVE Command
  543.  
  544. Syntax: RECEIVE [filespec]
  545.  
  546. The RECEIVE command tells Kermit-MS to receive a file or file  group  from  the
  547. other  system.   Kermit-MS passively waits for the file to arrive; this command
  548. is not to be used when talking to a Kermit server (use  GET  for  that).    You
  549. should already have issued a SEND command to the remote Kermit and escaped back
  550. to Kermit-MS before issuing the RECEIVE command.
  551.  
  552. If the optional filespec is provided, the first incoming file  will  be  stored
  553. under  that  name.    The filespec may include any combination of the following
  554. fields:
  555.  
  556.   Device designator
  557.       Store  the  file  on  the  designated device.  If no device designator is
  558.       given, store it on the current default device.
  559.  
  560.   Directory path
  561.       Store  the file in the designated directory.  If no path given, store the
  562.       file in the current directory.
  563.  
  564.   File name
  565.       Store the file under the name given.  If no name is given, store it under
  566.       the name it was sent under, converted, if necessary, to suit DOS  conven-
  567.       tions,  and  modified,  if  desired, to avoid overwriting any file of the
  568.       same name in the same directory.
  569.  
  570. If the optional filespec was provided, but more  than  one  file  arrives,  the
  571. first  file  will be stored under the given filespec, and the remainder will be
  572. stored under their own names, but on the specified device and directory.
  573.  
  574. If an incoming file does not arrive in its entirety,  Kermit-MS  will  normally
  575. discard  it  and it will not appear in your directory.  You may change this be-
  576. havior by using the command SET INCOMPLETE KEEP, which will cause  as  much  of
  577. the file as arrived to be saved on the disk.
  578.  
  579. The same single-character commands are available as during SEND:
  580.  
  581.   ^X  Request that the remote Kermit stop sending the current file, and proceed
  582.       to the next one immediately.  Since this is an optional  feature  of  the
  583.       Kermit protocol, the remote Kermit might not honor the request.
  584.  
  585.   ^Z  Request  that  the  remote  Kermit terminate the entire transfer; this is
  586.       also an optional feature that may or may not be supported by  the  remote
  587.       Kermit.
  588.  
  589.   ^C, ^E, and CR operate in the same way as they do during SEND.  In this case,
  590.       ^E should always do what ^Z is supposed to do.
  591.  
  592. If the incoming file has the same name as a file that already exists, and WARN-
  593. ING  is  set ON, Kermit-MS will change the incoming name (and inform you how it
  594. renamed it) so as not to obliterate the pre-existing file.  If WARNING is  OFF,
  595. the  original  file  will be overwritten; if you type ^X or ^Z to interrupt the
  596. transfer, you'll either get a partial new file, or else both the  old  and  the
  597. new  file of that name will be lost, depending on SET INCOMPLETE.  In any case,
  598. when WARNING is off, files with the same name as incoming files will  not  sur-
  599. vive.
  600.  
  601. Caution: If an incoming file's name (the part before the dot) corresponds to an
  602. MS-DOS device name, such as NUL, COM1, CON, AUX, or PRN, output will go to that
  603. device, rather than to a file with that name.  This is a feature of MS-DOS.
  604.  
  605.  
  606. The GET Command
  607.  
  608. Syntax: GET remote-filespec
  609.  
  610. The  GET command requests a remote Kermit server to send the file or file group
  611. specified by remote-filespec.  This command can be used only when Kermit-MS has
  612. a Kermit server active on the other end of the connection.  This means that you
  613. must have CONNECTed to the other system, logged in, run  Kermit  there,  issued
  614. the SERVER command, and escaped back (e.g. ^]C) to the local Kermit-MS.  If the
  615. remote Kermit does not have a SERVER command, then  you  should  use  SEND  and
  616. RECEIVE as described above.
  617.  
  618. You  may  use  the GET command in a special way to specify a different name for
  619. storing the incoming file.  Just type GET alone on a  line,  and  you  will  be
  620. prompted separately for the remote filespec and the local filespec:
  621.  
  622.     Kermit-MS>get
  623.      Remote Source File: com1 txt
  624.      Local Destination File: a:xcom1.txt
  625.  
  626. The  local  file name may contain a device field, and/or a directory specifica-
  627. tion.  If more than one file arrives, only the first will be renamed.    Device
  628. and  directory  specifications in the local destination file name work the same
  629. way as in the RECEIVE command.
  630.  
  631. The remote filespec is any string that can be a legal  file  specification  for
  632. the  remote  system;  it  is  not  parsed or validated locally.  It can contain
  633. whatever wildcard or file-group notation is valid on the  remote  system.    As
  634. files  arrive,  their names will be displayed on your screen, along with packet
  635. traffic statistics and status messages.  You may type ^X to  request  that  the
  636. current  incoming  file  be  cancelled,  ^Z to request that the entire incoming
  637. batch be cancelled, and ^C or  ^E  to  return  immediately  to  the  Kermit-MS>
  638. prompt, exactly as described for the RECEIVE command.
  639.  
  640.  
  641. 1.3.3. Commands for Controlling Remote Kermit Servers
  642.  
  643. The  BYE,  FINISH,  and  LOGOUT commands allow you to shut down a remote Kermit
  644. server:
  645.  
  646. BYE     When communicating with a remote Kermit server, use the BYE command  to
  647.         shut  down the server, log out its job, and exit locally from Kermit-MS
  648.         to DOS.
  649.  
  650. FINISH  Like BYE, FINISH shuts down the remote server.   However,  FINISH  does
  651.         not  log  out the server's job.  You are left at Kermit-MS prompt level
  652.         so that you can connect back to the job on the remote system.
  653.  
  654. LOGOUT  The LOGOUT command is identical to the BYE  command,  except  you  will
  655.         remain  at Kermit-MS prompt level, rather than exit to DOS, so that you
  656.         can establish or use another connection.
  657.  
  658. Other functions may be also requested of a server, described under  the  REMOTE
  659. command, immediately below.
  660.  
  661.  
  662. 1.3.4. Commands for File Management
  663.  
  664. Kermit-MS provides commands or managing both local and remote files.
  665.  
  666.  
  667. The REMOTE Commands
  668.  
  669. The REMOTE keyword is a prefix for a number of commands.  It indicates that the
  670. command is to be performed by the remote Kermit, which must  be  running  as  a
  671. server.    Note  that not all Kermit servers are capable of executing all these
  672. commands, and some Kermit servers may be able to perform  functions  for  which
  673. Kermit-MS  does  not  yet  have the corresponding commands.  In case you send a
  674. command the server cannot execute, it will send back a message stating that the
  675. command  is  unknown  to  it.  If the remote server can execute the command, it
  676. will send the results to your screen (or whatever device you have specified  in
  677. your most recent SET DESTINATION command).
  678.  
  679. Here are the REMOTE commands that Kermit-MS may issue:
  680.  
  681. REMOTE CWD [directory]
  682.         Ask the server to Change your Working Directory  on  the  remote  host,
  683.         that  is, the default source and destination area for file transfer and
  684.         management.  You will be prompted for a password, which will  not  echo
  685.         as  you type it.  If you do not supply a password (i.e. you type only a
  686.         carriage return), the server  will  attempt  to  access  the  specified
  687.         directory  without  a password.  If you do not supply a directory name,
  688.         your default or login directory on the remote system  will  be  assumed
  689.         and you will not be prompted for a password.
  690.  
  691. REMOTE DELETE filespec
  692.         Ask the server to delete the specified file or files on the remote sys-
  693.         tem.  In response, the server may display a list of the files that were
  694.         or were not successfully deleted.
  695.  
  696. REMOTE DIRECTORY [filespec]
  697.         Ask  the  server to display a directory listing of the specified files.
  698.         If no files are specified, then the list should include  all  files  in
  699.         the the current working directory.
  700.  
  701. REMOTE HELP
  702.         Ask the server to list the services it provides.
  703.  
  704. REMOTE HOST [command]
  705.         Ask  the  server  to  send  the  command to the remote system's command
  706.         processor for execution.
  707.  
  708. KERMIT command
  709.         Send  the  command  to the remote Kermit for interpretation as a Kermit
  710.         command itself, in the remote Kermit server's own command syntax.  Most
  711.         Kermit  servers,  including  Kermit-MS,  do not yet recognize such com-
  712.         mands.
  713.  
  714. REMOTE SPACE [directory]
  715.         Ask  the  server  to  provide  a  brief  summary  of  disk usage in the
  716.         specified area on the remote host or, if none specified, the default or
  717.         current area.
  718.  
  719. REMOTE TYPE filespec
  720.         Ask the server to display the contents of the specified remote file  or
  721.         files on your screen.
  722.  
  723.  
  724. The LOCAL Command
  725.  
  726. The  LOCAL keyword is a prefix for a number of commands.  It indicates that the
  727. specified command is to be executed on the local  MS-DOS  system.    The  LOCAL
  728. prefix  may  be  omitted.    All  file specifications may include device and/or
  729. directory fields.  The local commands are:
  730.  
  731. CWD path
  732.         Changes  the  current  working  directory  to  the  given  path.    All
  733.         references to local file names without explicit  paths  will  refer  to
  734.         that path.
  735.  
  736. DELETE filespec
  737.         Deletes the specified file or files.  As  in  DOS,  the  names  of  the
  738.         deleted  files  are  not  listed, only the message "file(s) deleted" or
  739.         "file(s) not  found",  and  if  you  give  the  command  "delete  *.*",
  740.         Kermit-MS will prompt "Are you sure?", like DOS.
  741.  
  742. DIRECTORY [filespec]
  743.         Lists the names, sizes, and creation dates  of  files  that  match  the
  744.         given  file  specification.    If  no filespec is given, the command is
  745.         equivalent to DIR *.*.
  746.  
  747. SPACE   Performs the MS-DOS CHKDSK function by running the CHKDSK program  from
  748.         the current path.
  749.  
  750. RUN command
  751.         Passes the command line to COMMAND.COM for execution.  Thus, any  legal
  752.         DOS  operation  is  permitted: running a program (with command line ar-
  753.         guments or i/o redirection), executing a DOS command,  or  executing  a
  754.         batch  file.    COMMAND.COM  should  be in the current path.  Kermit is
  755.         suspended while the command is executed and automatically  resumes  af-
  756.         terward.    Yes,  one  may  nest  RUN KERMIT several times if memory is
  757.         available; but that just wastes memory.  If the command is a  DOS  com-
  758.         mand  (like  DIR  or  REN) it will be executed directly by COMMAND.COM.
  759.         Otherwise, the specified file will be executed, which must be  in  .EXE
  760.         or  .COM  format,  or  a  .BAT  file  containing DOS commands, from the
  761.         specified path or according to the value of the  PATH  variable  if  no
  762.         path was included in the filespec.  Example:  
  763.  
  764.             Kermit-MS>run more < foo.txt
  765.  
  766. TYPE filespec
  767.         Displays the specified local file on the screen.   Automatic  pause  is
  768.         not  available  at  the end of a page (but see above example for how to
  769.         accomplish this).  On most systems, Ctrl-S can be used to stop  scroll-
  770.         ing and Ctrl-Q to continue scrolling.
  771.  
  772. PUSH    Invokes   an   MS-DOS   command  processor  "under"  Kermit-MS,  either
  773.         COMMAND.COM or whatever shell  you  have  specified  with  COMSPEC  (or
  774.         SHELL,  depending  on  the  system)  in  your CONFIG.SYS file.  You can
  775.         return to Kermit-MS by typing the MS-DOS EXIT  command,  and  you  will
  776.         find  Kermit-MS  as  you  left  it, with all settings intact.  The same
  777.         function is accomplished by the CONNECT escape-level command P.
  778.  
  779. The local RUN command has various uses, one of which is to supplement the  fea-
  780. tures  of Kermit-MS.  A common complaint about Kermit-MS, for instance, is that
  781. it lacks login scripts, autodialer control, and phone directories.  While wait-
  782. ing  for  these  features  to  appear in a generally useful form in some future
  783. release, you might be able to provide the specific functions you need by  writ-
  784. ing a program in any compiled language (assembler, Pascal, C, etc) and then in-
  785. voking from within Kermit-MS using the RUN command.  For instance, if you  have
  786. a  Hayes-like modem, you could write a short program to operate the dialer with
  787. AT commands, accepting the phone number to dial on the command line.   If  this
  788. program were called DIAL, then you could "run dial 7654321" from within Kermit.
  789.  
  790.  
  791. The TAKE Command
  792.  
  793. Syntax: TAKE filespec
  794.  
  795. The  TAKE  command  instructs  Kermit-MS to execute commands from the specified
  796. file, which may include an explicit path; if no path is specified, the value of
  797. the  PATH  variable  is  used;  if PATH has no value, then the current disk and
  798. directory are searched.  The command file may include any valid Kermit-MS  com-
  799. mands,  including TAKE, but it cannot include characters to be sent to a remote
  800. host during terminal emulation (i.e.  after a CONNECT command).
  801.  
  802. Commands within TAKE files, unlike interactive commands, may  include  trailing
  803. comments, preceded by semicolons:
  804.  
  805.     set port 2      ; Select the modem port
  806.     set speed 1200  ; Set the baud rate for the modem
  807.  
  808. Warning:  since TAKE file processing discards all characters from a line begin-
  809. ning with the first semicolon, it is not  possible  to  include  semicolons  in
  810. remote filespecs within TAKE files, e.g.
  811.  
  812.     get dska:foo.bar;6
  813.  
  814. Commands  from the TAKE file will normally not be displayed on your screen.  If
  815. you want to see them as they are executing, you can SET TAKE-ECHO ON.
  816.  
  817.  
  818. The LOG and CLOSE Commands
  819.  
  820. Syntax: LOG filespec
  821.         CLOSE
  822.  
  823. Specifies that your terminal session during CONNECT will  be  recorded  in  the
  824. specified  file;  the filespec may include a device specification and/or direc-
  825. tory path.  The LOG command allows you to "capture" files from a remote  system
  826. that doesn't have Kermit, as well as to record remote command typescripts.  The
  827. log is closed when you EXIT from Kermit-MS or when you issue an explicit  CLOSE
  828. command.
  829.  
  830. During  terminal emulation, the LOG command records all the characters that ar-
  831. rive from the remote host in the specified file,  including  escape  sequences.
  832. If  you  have  SET  LOCAL-ECHO ON, it will also record the characters you type.
  833. And if you have also SET DEBUG ON, then  during  file  transfer  it  will  also
  834. record the packets in the log.
  835.  
  836. You may LOG PRN to cause the logging information to be printed directly on your
  837. printer.  Note that any escape sequences that are sent to the screen  are  also
  838. sent to the printer.
  839.  
  840. If  you  want  to record information without imbedded escape sequences, use the
  841. screen dump feature, invoked by the CONNECT escape-level command  F,  which  is
  842. described in more detail in the terminal emulation section.
  843.  
  844.  
  845. 1.3.5. The SERVER Command
  846.  
  847. Kermit-MS  is capable of acting as a full-fledged Kermit server, providing file
  848. transfer and management for users coming in through one  of  the  communication
  849. ports.  To put Kermit-MS into server mode, first issue any desired SET commands
  850. to select and configure the desired port, and then  type  the  SERVER  command.
  851. Kermit-MS will await all further instructions from the user Kermit on the other
  852. end of  the  connection,  which  may  be  hardwired  or  connected  through  an
  853. autoanswer modem.  For example:
  854.  
  855.     Kermit-MS>set port 1
  856.     Kermit-MS>set baud 1200
  857.     Kermit-MS>set timer on
  858.     Kermit-MS>set warning on
  859.     Kermit-MS>server
  860.  
  861. Kermit 2.29 server mode supports the following requests:
  862.  
  863.     SEND           REMOTE DELETE       REMOTE CWD
  864.     GET            REMOTE DIRECTORY    REMOTE HOST
  865.     FINISH         REMOTE SPACE
  866.     BYE            REMOTE TYPE
  867.  
  868. The  REMOTE  HELP command is not implemented.  Remote CWD can be used to change
  869. both directories and devices.
  870.  
  871.     CAUTION: The method used for most of the REMOTE commands is to invoke a
  872.     task  with  the user's command line, redirect standard output to a tem-
  873.     porary file, $KERMIT$.TMP, send that file back to the remote  end,  and
  874.     then delete the file.  Sufficient space must be available to store this
  875.     file.  To service DOS commands or user tasks the boot drive must hold a
  876.     copy  of  COMMAND.COM.    PATH  will  not be searched (this can be dis-
  877.     asterous on a floppy disk based system).
  878.  
  879.     FURTHER CAUTION: Any of these DOS tasks or programs  may  encounter  an
  880.     error,  and  in  that case, DOS will generally put the familiar "Abort,
  881.     Retry, Ignore?" message on the screen, and will wait for an answer from
  882.     the  keyboard.    This  will hang the server until a human comes to the
  883.     keyboard and gives a response.  The same thing  will  happen  when  any
  884.     program is invoked that interacts with the real console.  For instance,
  885.     REMOTE SPACE works by running CHKDSK; if CHKDSK finds  something  wrong
  886.     with the disk while tallying up the space, it will ask (at the console)
  887.     if you want to it to be fixed.  This, too, will hang the server.
  888.  
  889.     MORAL: The MS-DOS Kermit server should probably not be used for  REMOTE
  890.     commands  unless  someone  is  around  to  take care of it when it gets
  891.     stuck.
  892.  
  893.  
  894. 1.3.6. The SET Command
  895.  
  896. Syntax: SET parameter value
  897.      or: SET parameter parameter value
  898. The SET command establishes or modifies various parameters for file transfer or
  899. terminal  connection.    You  can examine their values with the STATUS and SHOW
  900. commands.  The following SET commands are available in Kermit-MS:
  901.  
  902.                 BAUD  Communications port line speed (synonym for SPEED)
  903.                 BELL  Whether to beep at the end of a transaction
  904.     BLOCK-CHECK-TYPE  Level of error checking for file transfer
  905.                DEBUG  Display packet contents during file transfer
  906.         DEFAULT-DISK  Default disk drive for file i/o
  907.          DESTINATION  Default destination device for incoming files
  908.              DISPLAY  For selecting the type of file transfer display
  909.                 DUMP  Screen dump file (or device) name
  910.          END-OF-LINE  Packet termination character
  911.                  EOF  Method for determining or marking end of file
  912.               ESCAPE  Escape character for CONNECT
  913.         FLOW-CONTROL  Enable or disable XON/XOFF
  914.            HANDSHAKE  Half-duplex line turnaround option
  915.           INCOMPLETE  What to do with an incompletely received file
  916.                  KEY  Specify key redefinitions, or "keystroke macros"
  917.           LOCAL-ECHO  Specify which computer does the echoing during CONNECT
  918.            MODE-LINE  Whether to display a mode line during terminal emulation
  919.               PARITY  Character parity to use
  920.                 PORT  Select a communications port
  921.               PROMPT  Change the "Kermit-MS>" prompt to something else
  922.              RECEIVE  Request remote Kermit to use specified parameters
  923.               REMOTE  For running Kermit-MS interactively from back port
  924.                RETRY  Packet retransmission threshold
  925.                 SEND  Use the specified parameters during file transfer
  926.                SPEED  Communications port line speed (synonym for BAUD)
  927.            TAKE-ECHO  Control echoing of commands from TAKE files
  928.             TERMINAL  Emulation and parameters
  929.                TIMER  Enable/disable timeouts during file transfer
  930.              WARNING  Specify how to handle filename collisions
  931.  
  932. The SET commands are now described in greater detail.
  933.  
  934.  
  935. SET BAUD
  936.  
  937. Syntax: SET BAUD rate
  938.  
  939. Set the speed of the currently selected terminal communications port  (COM1  by
  940. default)  to  300,  1200,  1800,  2400, 4800, 9600, 19200, or other common baud
  941. rate.  Some implementations  do  not  support  this  command.    In  any  case,
  942. Kermit-MS leaves the current communication port settings alone unless you issue
  943. explicit SET commands to change them.  SET SPEED is an acceptable  synomym  for
  944. SET BAUD.  Note that on certain systems, when you first run Kermit after power-
  945. ing the system up, you may get a message "Unrecognized baud rate".  This  means
  946. that Kermit tried to read the baud rate from the port and none was set.  Simply
  947. use SET BAUD (if available) or the DOS MODE command to  set  the  desired  baud
  948. rate.
  949.  
  950.  
  951. SET BELL
  952.  
  953. Syntax: SET BELL {ON, OFF}
  954.  
  955. Specifies  whether  the  bell  (beeper)  should sound upon completion of a file
  956. transfer operation.  Normally ON.
  957.  
  958.  
  959. SET BLOCK-CHECK
  960.  
  961. Syntax: SET BLOCK-CHECK {1, 2, 3}
  962.  
  963. Selects the error detection method: a 1-character checksum (the normal case), a
  964. 2-character  checksum,  or  a 3-character 16-bit cyclic redundancy check (CRC).
  965. If the other Kermit program is not capable of type 2  or  3  checking  methods,
  966. automatic fallback to type 1 will occur.
  967.  
  968.  
  969. SET DEBUG
  970.  
  971. Syntax: SET DEBUG {ON, OFF}
  972.  
  973. When  debugging is ON, Kermit will display packet traffic on your screen during
  974. file transfer.  If the debugger is loaded, control will be  transferred  to  it
  975. when  Ctrl-C is typed.  During terminal emulation (on the IBM PC only), control
  976. characters are displayed in uparrow notation.  If logging is being  done,  file
  977. transfer  packets  are  included  in  the log.  When OFF (this is the default),
  978. debugging information is not displayed, and packets are not logged.
  979.  
  980.  
  981. SET DEFAULT-DISK
  982.  
  983. Syntax: SET DEFAULT-DISK x:
  984.  
  985. Specify the default disk drive to use for file  transfer,  directory  listings,
  986. and so forth.  Equivalent to typing the DOS command for changing disks (A:, B:,
  987. etc).  Affects Kermit and all inferior processes, but when you exit  from  Ker-
  988. mit, you will still have the same default disk as when you entered.
  989.  
  990.  
  991. SET DESTINATION
  992.  
  993. Syntax: SET DESTINATION device
  994.  
  995. Specify  the  device for incoming files during file transfer: DISK, PRINTER, or
  996. SCREEN.  SET DESTINATION PRINTER  will  cause  incoming  files  to  be  spooled
  997. directly to the printer; SCREEN will send output normally destined for the disk
  998. to the screen.  The normal destination is DISK.  SET DESTINATION  affects  only
  999. files  transferred with SEND, GET, or RECEIVE; it cannot be used to reroute the
  1000. output from REMOTE server commands.
  1001.  
  1002.  
  1003. SET DISPLAY
  1004.  
  1005. Syntax: SET DISPLAY {QUIET, REGULAR, SERIAL}
  1006.  
  1007. During file transfer, MS-DOS Kermit's regular display  is  a  formatted  screen
  1008. whose  fields  randomly  updated with file names, packet numbers, error counts,
  1009. percent done, error messages, and so forth:
  1010.  
  1011.                File name: FOO
  1012.       KBytes transferred: 7
  1013.                  Sending: In progress
  1014.             Percent done: 52%
  1015.        Number of packets: 74
  1016.        Number of retries: 2
  1017.               Last error: None
  1018.             Last warning: None
  1019.  
  1020. The items in the right-hand column are updated more or less at random.
  1021.  
  1022. If you wish to run Kermit-MS interactively through the back port, for  instance
  1023. after  the operator has done CTTY COM1, you must give the command SET REMOTE ON
  1024. (which, currently at least, is equivalent to  SET  DISPLAY  QUIET);  this  sup-
  1025. presses  the  file transfer display screen, so that the display won't interfere
  1026. with the file transfer itself.  You can also use this command to  suppress  the
  1027. display  in  local  mode,  in case you are using a system that allows you to do
  1028. other work while file transfer proceeds in the background.
  1029.  
  1030. If you have your PC connected to a  speaking  device  (a  common  practice  for
  1031. visually  impaired  people), or you are logging the display screen to a printer
  1032. (using DOS ^P or kermit > prn), the random nature of the regular  display  will
  1033. make  the  results of little use.  SET DISPLAY SERIAL is provided for this pur-
  1034. pose; it causes the program to report progress "serially" on the  screen.    In
  1035. serial mode, error messages are preceeded with the word "Error" and repeat mes-
  1036. sages with the word "Retry".  Packets are numbered as dots with every tenth be-
  1037. ing  a  plus  sign.  The packet display is automatically broken across lines at
  1038. every 70th packet.  The serial display makes much more sense when  spoken  than
  1039. does the regular display.
  1040.  
  1041. The  serial display does not show the percent and kilobytes transferred.  It is
  1042. the default display style for generic MS-DOS Kermit; REGULAR is the default for
  1043. all others.
  1044.  
  1045.  
  1046. SET DUMP
  1047.  
  1048. Syntax: SET DUMP path
  1049.  
  1050. On  those  systems that support this feature, change the file or device name of
  1051. the screen dump file.  The normal file name is KERMIT.SCN.  See the section  on
  1052. terminal emulation for details about screen dumps.
  1053.  
  1054.  
  1055. END-OF-LINE
  1056.  
  1057. Syntax: SET END-OF-LINE number
  1058.  
  1059. If the remote system needs packets to be terminated by anything other than car-
  1060. riage return, specify the decimal value of the desired ASCII character.
  1061.  
  1062.  
  1063. SET EOF
  1064.  
  1065. Syntax: SET EOF {CTRL-Z, NOCTRL-Z}
  1066.  
  1067. Controls how the end of file is handled.  CTRL-Z specifies a Control-Z  charac-
  1068. ter  should  be appended to the end of an incoming file, unless it already ends
  1069. with a Control-Z.  Certain MS-DOS text editors and other  applications  require
  1070. files  to  be in this format.  For outbound files, treat the first Control-Z as
  1071. the end of the local file, and do not send it  or  any  subsequent  characters.
  1072. NOCTRL-Z  is the default; incoming files are stored, and MS-DOS files are sent,
  1073. exactly as is, in their entirety.
  1074.  
  1075.  
  1076. SET ESCAPE
  1077.  
  1078. Syntax: SET ESCAPE character
  1079.  
  1080. Specify the control character you want to use to "escape" from  remote  connec-
  1081. tions  back  to  Kermit-MS.  The default is normally ^] (Control-Rightbracket).
  1082. The character is entered literally, and should normally be chosen from the  AS-
  1083. CII  control range.  It is not possible to use non-ASCII characters (e.g. func-
  1084. tion keys) for this purpose.
  1085.  
  1086.  
  1087. SET FLOW-CONTROL
  1088.  
  1089. Syntax: SET FLOW-CONTROL {XON/XOFF, NONE}
  1090.  
  1091. Specify the full duplex flow control to be done on the currently selected port.
  1092. The  options are XON/XOFF and NONE.  The specified type of flow control will be
  1093. done during both terminal emulation and file transfer.   By  default,  XON/XOFF
  1094. flow  control  is  selected.  XON/XOFF should not be used on half-duplex (local
  1095. echo) connections.  If XON/XOFF is used, HANDSHAKE should be set to NONE.
  1096.  
  1097.  
  1098. SET HANDSHAKE
  1099.  
  1100. Syntax: SET HANDSHAKE {CODE number, BELL, CR, LF, NONE, XOFF, XON}
  1101.  
  1102. Specify any half-duplex line turnaround handshake character for  the  currently
  1103. selected port.  The CODE number form allows any ASCII character to be specified
  1104. by its decimal ASCII code.  The  specified  handshaking  is  done  during  file
  1105. transfer  only.   Handshake is NONE by default; if set to other than NONE, then
  1106. FLOW-CONTROL should be set to NONE.
  1107.  
  1108.  
  1109. SET INCOMPLETE
  1110.  
  1111. Syntax: SET INCOMPLETE {DISCARD, KEEP}
  1112.  
  1113. Specifies what to do with files that arrive incompletely: discard them or  keep
  1114. them.  They are normally discarded.
  1115.  
  1116.  
  1117. SET KEY
  1118.  
  1119. Syntax: SET KEY key-specifier
  1120.  
  1121. Specifies that when the designated key is struck during terminal emulation, the
  1122. associated character string is sent.  The key-specifier is one of the  keywords
  1123. F1,  F2,  ..., or else SCAN followed by a scan code.  Systems that have a BACK-
  1124. SPACE key also include BACKSPACE as a keyword.
  1125.  
  1126. If SCAN is used, it is followed by a decimal number to indicate the  scan  code
  1127. of  the  key,  which  you would ascertain from your system reference manual, or
  1128. else by using the Kermit-MS SHOW KEY command.  SET KEY prompts  you  on  a  new
  1129. line  for  the definition string.  Certain characters, like ESC and CR, may not
  1130. be entered literally into the string, but can be included by  inserting  escape
  1131. codes  of  the  form \ooo, a backslash followed by a 2- or 3-digit octal number
  1132. corresponding to the ASCII value of the desired character.  If some  other  key
  1133. redefinition package, like ProKey, has been loaded, then its redefinitions will
  1134. take precedence over Kermit's.
  1135.  
  1136. The SET KEY command is illustrated in the  terminal  emulation  section  below.
  1137. Note  that  key  redefinitions occur only during terminal emulation, and not at
  1138. Kermit-MS command level, or outside of Kermit.
  1139.  
  1140.  
  1141. SET LOCAL-ECHO
  1142.  
  1143. Syntax: SET LOCAL-ECHO {ON, OFF}
  1144.  
  1145. Specify how characters are echoed during terminal emulation  on  the  currently
  1146. selected  port.    ON  specifies  that characters are to be echoed by Kermit-MS
  1147. (because neither the remote computer nor the communications circuitry has  been
  1148. requested to echo), and is appropriate for half-duplex connections.  LOCAL-ECHO
  1149. is OFF by default, for full-duplex, remote echo operation.
  1150.  
  1151. When using Kermit to connect two PCs "back to back," use  local  echo  so  that
  1152. when  you CONNECT to the other PC to send messages to its operator, you can see
  1153. what you are typing.  Depending on the system, you may have to type a  carriage
  1154. return and a linefeed at the end of each line in order to make the display look
  1155. right.
  1156.  
  1157.  
  1158. SET MODE-LINE
  1159.  
  1160. Syntax: SET MODE-LINE {ON, OFF}
  1161.  
  1162. On systems, like the IBM PC family, which are capable of displaying  a  status,
  1163. or  "mode"  line on the 25th line during terminal connection, disable or enable
  1164. this function.  Has no effect on systems that do not display a mode line during
  1165. connect.   When the mode line is enabled, it may be turned on and off using the
  1166. CONNECT escape-level command M. Refer to the terminal emulation  section,  1.4,
  1167. for further details.
  1168.  
  1169.  
  1170. SET PARITY
  1171.  
  1172. Syntax: SET PARITY {EVEN, ODD, MARK, SPACE, NONE}
  1173.  
  1174. Specify  the  character parity to be used on the currently selected port.  NONE
  1175. means no parity processing is done, and the 8th bit of each  character  can  be
  1176. used for data when transmitting binary files.  This is the normal case.
  1177.  
  1178. You  will  need  to  SET PARITY to ODD, EVEN, MARK, or possibly SPACE when com-
  1179. municating with a system, or over a network, or through modems,  concentrators,
  1180. multiplexers, or front ends that require or impose character parity on the com-
  1181. munication line.  For instance, GTE  Telenet normally uses MARK parity.  If you
  1182. neglect  to  SET  PARITY  when  the  communications  equipment requires it, the
  1183. symptom may be that terminal emulation works (well or  maybe  only  partially),
  1184. but file transfer does not work at all.
  1185.  
  1186. If  you  have  set parity to ODD, EVEN, MARK, or SPACE, then Kermit-MS will re-
  1187. quest that binary files will be transferred using 8th-bit-prefixing.    If  the
  1188. other  Kermit knows how to do 8th-bit-prefixing (this is an optional feature of
  1189. the Kermit protocol, and not all implementations of Kermit have it),  then  bi-
  1190. nary  files  can  be  transmitted successfully.  If NONE is specified, 8th-bit-
  1191. prefixing will not be requested.  Note that there  is  no  advantage  to  using
  1192. parity; it reduces Kermit's file transfer efficientcy without providing any ad-
  1193. ditional error detection.  The SET PARITY command is  provided  only  to  allow
  1194. Kermit  to  adapt to conditions where parity is required, or 8-bit transmission
  1195. is otherwise thwarted.
  1196.  
  1197.  
  1198. SET PORT
  1199.  
  1200. Syntax: SET PORT {number, COM1, COM2}
  1201.  
  1202. On machines with more than one communications port, select the port to use  for
  1203. file  transfer and CONNECT.  This command lets you use a different asynchronous
  1204. adapter, or switch between two or more  simultaneous  remote  sessions.    Sub-
  1205. sequent  SET  BAUD, PARITY, HANDSHAKE, FLOW, and LOCAL-ECHO commands will apply
  1206. to this port only.  SET PORT 1 selects COM1, SET PORT 2 selects COM2.  All ver-
  1207. sions  default to port 1, except for the IBM PCjr, which uses port 2 by default
  1208. (since Kermit does not know how to control its port 1, an internal modem).
  1209.  
  1210. In "generic" MS-DOS Kermit, the following alternate forms allow you to  experi-
  1211. ment with device names or numbers until you find the communication port:  
  1212.  
  1213.     SET PORT {DEVICE, FILE-HANDLE}
  1214.  
  1215. Just  type  a  carriage  return after either of these commands, and you will be
  1216. prompted for a device name or a numeric port-handle.  Keep trying till you find
  1217. one that works.
  1218.  
  1219.  
  1220. SET PROMPT
  1221.  
  1222. Syntax: SET PROMPT string
  1223.  
  1224. This command allows you to change the MS-DOS Kermit program's prompt.
  1225.  
  1226.  
  1227. SET RECEIVE
  1228.  
  1229. Syntax: SET RECEIVE parameter value
  1230.  
  1231. At  the beginning of a protocol operation, request the remote Kermit to use the
  1232. given value specified parameter, or inform Kermit-MS  that  the  remote  Kermit
  1233. will be using it.
  1234.  
  1235. PACKET-LENGTH number
  1236.         Ask the remote Kermit to use the specified maximum length  for  packets
  1237.         that  it  sends  to  Kermit-MS.  The normal (and maximum) length is 94.
  1238.         Use this command to shorten packets if the communication line is noisy;
  1239.         this  will  decrease  the  probability that a particular packet will be
  1240.         corrupted, and will reduce the retransmission overhead when  corruption
  1241.         occurs, but it will increase the protocol overhead.
  1242.  
  1243. PADCHAR number
  1244.         Ask the remote Kermit to use the given control character (expressed  as
  1245.         a  decimal  number  0-31,  or  127) for interpacket padding.  Kermit-MS
  1246.         should never require any padding.
  1247.  
  1248. PADDING number
  1249.         Ask  the remote Kermit to insert the given number of padding characters
  1250.         before each packet it sends.  This should never be necessary.
  1251.  
  1252. START-OF-PACKET number
  1253.         If  the  remote  Kermit will be marking the beginning of packets with a
  1254.         control character other  than  Control-A,  use  this  command  to  tell
  1255.         Kermit-MS  about  it (the number should be the decimal ASCII value of a
  1256.         control character).  This will be necessary only if the hosts  or  com-
  1257.         munication  equipment involved cannot pass a Control-A through as data,
  1258.         or if some piece of communication equipment is echoing packets back  at
  1259.         you.
  1260.  
  1261. TIMEOUT number
  1262.         Ask the remote Kermit to time out after the given number of seconds  if
  1263.         a  packet expected from Kermit-MS has not arrived.  Use this command to
  1264.         change the normal timeout interval.
  1265.  
  1266.  
  1267. SET REMOTE
  1268.  
  1269. Syntax: SET REMOTE {ON, OFF}
  1270.  
  1271. SET REMOTE ON removes the file transfer display (as if you had given  the  com-
  1272. mand  SET  DISPLAY QUIET).  It should be used when you are running Kermit-MS in
  1273. remote mode (i.e. when coming in from another PC through the Kermit-MS's  "back
  1274. port",  to  which  the console has been reassigned using the DOS CTTY command).
  1275. It is necessary to issue this command because (a) Kermit-MS has no way of know-
  1276. ing  that its console has been redirected, and (b) when the console is the same
  1277. as the port, the file transfer display will interfere with  the  file  transfer
  1278. itself.    SET  REMOTE  OFF  returns the file transfer display to its preferred
  1279. style (REGULAR or SERIAL).
  1280.  
  1281.  
  1282. SET RETRY
  1283.  
  1284. Syntax: SET RETRY number
  1285.  
  1286. Sets the number of times a packet is retransmitted before  the  protocol  gives
  1287. up.   The number of retries can be between 1 and 63, and is 5 by default.  This
  1288. is an especially useful parameter when the communications line is noisy or  the
  1289. remote host is very busy.
  1290.  
  1291.  
  1292. SET SEND
  1293.  
  1294. Syntax: SET SEND parameter value
  1295.  
  1296. PACKET-LENGTH number
  1297.         Use the specified maximum  length  for  outbound  packets.    Normally,
  1298.         Kermit-MS uses whatever length the other Kermit requests.
  1299.  
  1300. PADCHAR number
  1301.         Use the specified control character  for  interpacket  padding.    Some
  1302.         hosts  may require some padding characters (normally NUL or DEL) before
  1303.         a packet, and certain front ends or other communication  equipment  may
  1304.         need certain control characters to put them in the right modes.
  1305.  
  1306. PADDING number
  1307.         How many copies of the pad character to send before each  packet,  nor-
  1308.         mally zero.
  1309.  
  1310. PAUSE number
  1311.         How many milliseconds to pause between sending the next packet,  0-127,
  1312.         normally zero.  This helps half-duplex systems prepare for reception of
  1313.         our packet.  Padding characters are sent only after the time limit  ex-
  1314.         pires.
  1315.  
  1316. QUOTE number
  1317.         Use the indicated printable character for prefixing  (quoting)  control
  1318.         characters and other prefix characters.  The only reason to change this
  1319.         would be for sending a very long  file  that  contains  very  many  "#"
  1320.         characters (the normal control prefix) as data.
  1321.  
  1322. START-OF-PACKET number
  1323.         Mark the beginning of outbound  packets  with  some  control  character
  1324.         other than Control-A.  This will be necessary if the remote host or the
  1325.         communication channel involved cannot accept a Control-A as data, or if
  1326.         it  echoes back your packets.  The remote host must have been given the
  1327.         corresponding SET RECEIVE START-OF-PACKET command.
  1328.  
  1329. TIMEOUT number
  1330.         Change  Kermit-MS's  normal timeout interval; this command is effective
  1331.         only if TIMER is set to be ON; it is normally OFF so  that  the  remote
  1332.         Kermit can control timeouts.  When the timer is ON, the default timeout
  1333.         interval is 13 seconds.
  1334.  
  1335.  
  1336. SET SPEED
  1337.  
  1338. Syntax: SET SPEED rate
  1339.  
  1340. Same as SET BAUD, q.v.
  1341.  
  1342.  
  1343. SET TAKE-ECHO
  1344.  
  1345. Syntax: SET TAKE-ECHO {ON, OFF}
  1346.  
  1347. Specifies whether screen display should occur during implicit or explicit  TAKE
  1348. operations on MSKERMIT.INI or other Kermit-MS command files, and during evalua-
  1349. tion of macro definitions.  Handy for finding errors.
  1350.  
  1351.  
  1352. SET TERMINAL
  1353.  
  1354. Syntax: SET TERMINAL parameter [value]
  1355.  
  1356. This command controls  most  aspects  of  terminal  emulation.    Most  of  the
  1357. parameters  are  only  settable  (or  meaningful) on the IBM PC family and com-
  1358. patibles.  (Programmers who are proficient on other MS-DOS systems are  invited
  1359. to  fill  in  these  functions  for  those systems and send the results back to
  1360. Columbia.)
  1361.  
  1362. The first group of parameters tells which kind of terminal to  emulate.    When
  1363. Kermit-MS uses its built-in software for emulation, incoming characters are ex-
  1364. amined for screen control commands (escape sequences)  specific  to  that  ter-
  1365. minal, and if encountered, the commands are executed on the PC screen.
  1366.  
  1367. NONE    Act  as  a  dumb terminal.  All incoming characters will be sent to the
  1368.         screen "bare", as-is, through DOS.  If you have loaded a device  driver
  1369.         into DOS for the CON device, such as ANSI.SYS, then that driver will be
  1370.         able to interpret the codes itself.  Many non-IBM  systems  have  their
  1371.         own  screen  control  code  interpreter  built into DOS or firmware, or
  1372.         available as a loadable device driver.
  1373.  
  1374. VT52    The DEC VT-52 terminal.
  1375.  
  1376. HEATH   The Heath/Zenith-19 terminal (H19), which supports all  the  VT52  com-
  1377.         mands,  plus  line and character insert/delete editing functions, and a
  1378.         25th line.
  1379.  
  1380. VT102   The DEC VT102 (ANSI) terminal, which is the same as a  VT100  but  also
  1381.         supports line/character insert/delete editing functions.
  1382.  
  1383. TEKTRONIX
  1384.         A Tektronix 4010 graphics terminal.  Only available on  TI  and  Victor
  1385.         PCs.
  1386.  
  1387. The  specific  escape  sequences supported by Kermit for each of these terminal
  1388. types are listed in section 1.10.
  1389.  
  1390. The remaining SET TERMINAL commands specify setup options for the selected ter-
  1391. minal:
  1392.  
  1393.  CHARACTER-SET {UK, US}
  1394.          UK displays # as a pound sterling sign, US displays # as #.
  1395.  
  1396.  COLOR number [, number [, number]]
  1397.          Several  numbers, applied in left to right sequence, separated by com-
  1398.          mas or spaces:
  1399.  
  1400.            0   Reset the colors to normal intensity white characters on a black
  1401.                background  and use the "no-snow" mode on the IBM Color Graphics
  1402.                Adapter (CGA).
  1403.            1   High intensity foreground
  1404.            10  Request fast screen updating for use on the IBM EGA or PGA,  and
  1405.                some non-IBM CGAs.
  1406.            3x  Foreground color
  1407.            4x  Background color
  1408.  
  1409.          where x is a single digit from 0 to 7, which is the sum of the desired
  1410.          colors:
  1411.  
  1412.            1   Red
  1413.            2   Green
  1414.            4   Blue
  1415.  
  1416.          Example: 0, 1, 34, 40 on an IBM CGA would produce blue  characters  on
  1417.          black  field  with  no snow.  The snow removal business has to do with
  1418.          whether the program should synchronize with vertical retrace when  up-
  1419.          dating  screen  memory.  This is necessary with certain color adaptors
  1420.          (like the CGA) and unnecessary for others (like the EGA).
  1421.  
  1422.  CURSOR-STYLE {BLOCK, UNDERLINE}
  1423.          Sets the cursor rendition to your preference.  Note that on some early
  1424.          IBM PCs and compatibles, the cursor  may  not  be  restored  correctly
  1425.          after escape back from CONNECT because of a bug in the early IBM BIOS.
  1426.  
  1427.  KEYCLICK {ON, OFF}
  1428.          Turns electronic keyclick ON or OFF.  If your keyboard has a  mechani-
  1429.          cal  clicker (as IBM boards do), you may not notice the effect of this
  1430.          command.
  1431.  
  1432.  MARGIN-BELL {ON, OFF}
  1433.          Controls  whether  the  bell  should be sounded when the cursor passes
  1434.          column 72 near the right screen margin.
  1435.  
  1436.  NEWLINE-MODE {ON, OFF}
  1437.          ON  sends  a carriage-return-linefeed combination (CRLF) when you type
  1438.          carriage return (CR) during terminal  emulation;  OFF  (default)  just
  1439.          sends a CR when you type CR.
  1440.  
  1441.  SCREEN-BACKROUND {NORMAL, REVERSE}
  1442.          NORMAL means dark background, light characters.  REVERSE  means  light
  1443.          background, dark characters.
  1444.  
  1445.  TAB {AT n, CLEAR AT n, CLEAR ALL}
  1446.          Sets tab stops or clears one or all tab stops.  n is the numeric posi-
  1447.          tion  of  the  tab to be set or cleared.  By default, tabs are every 8
  1448.          spaces, at positions 9, 17, 25, etc.  Only meaningful when emulating a
  1449.          terminal  that  has  settable  tabs (the VT52 doesn't).  More than one
  1450.          tabstop may be specified by separating  column  numbers  with  commas,
  1451.          spaces, or tabs.
  1452.  
  1453.  WRAP {ON, OFF}
  1454.          ON automatically breaks screen lines (by inserting a CRLF)  when  they
  1455.          reach  the the right margin; OFF disables wrapping -- if a line is too
  1456.          long, the excess characters go off the screen.
  1457.  
  1458.  
  1459. SET TIMER
  1460.  
  1461. Syntax: SET TIMER {ON, OFF}
  1462.  
  1463. This command enables or disables the timer that is used during file transfer to
  1464. break  deadlocks  that  occur when expected packets do not arrive.  By default,
  1465. the timer is ON.
  1466.  
  1467.  
  1468. SET WARNING
  1469.  
  1470. Syntax: SET WARNING {ON, OFF}
  1471.  
  1472. Specify what to do when an incoming file has the same name as an existing  file
  1473. in  the  default  directory of the default device.  If ON, Kermit will warn you
  1474. when an incoming file has the same name as an existing file, and  automatically
  1475. rename  the  incoming  file  (as indicated in the warning message) so as not to
  1476. destroy (overwrite) any existing  one.    If  OFF,  the  pre-existing  file  is
  1477. destroyed,  even  if  the incoming file does not arrive completely.  WARNING is
  1478. OFF by default.
  1479.  
  1480. The new name is formed by adding numbers to the part of  the  name  before  the
  1481. dot.  For instance, ABC.TXT becomes ABC00001.TXT, then ABC00002.TXT, etc.
  1482.  
  1483.  
  1484. 1.3.7. The SHOW Command
  1485.  
  1486. Syntax: SHOW option
  1487.  
  1488. Most  parameters  that  may  be  altered with SET commands are displayed by the
  1489. STATUS command.  The SHOW command is used for displaying macro definitions  and
  1490. key redefinitions.
  1491.  
  1492. The  SHOW MACROS command displays the definitions of all currently defined mac-
  1493. ros, as well as the amount of space left for new macro definitions.
  1494.  
  1495. The SHOW KEY command allows you to determine the scan code produced by pressing
  1496. a  given  key, so that you can construct a SET KEY SCAN command to redefine the
  1497. key.  If the key already has a redefinition in effect, that too  will  be  dis-
  1498. played.  This can be done either interactively or in a macro command.  Refer to
  1499. the terminal emulation section for examples.
  1500.  
  1501. The SHOW KEY command only works on certain systems.
  1502.  
  1503.  
  1504. 1.3.8. Command Macros
  1505.  
  1506. Kermit-MS provides a facility for combining commands into  "macros."    Command
  1507. macro  definitions  may be included in your MSKERMIT.INI file, TAKEn explicitly
  1508. from a specified file, or typed interactively.  Macros are invoked with the  DO
  1509. command.
  1510.  
  1511.  
  1512. The DEFINE Command
  1513.  
  1514. Syntax: DEFINE macro-name [command [, command [, ...]]]
  1515.  
  1516. Kermit-MS  command  macros  are  constructed  with  the  DEFINE  command.   Any
  1517. Kermit-MS commands may be included.  Example:
  1518.  
  1519.     define telenet set parity mark, set baud 1200, connect
  1520.  
  1521. A macro can be undefined by typing an empty DEFINE command for it, like 
  1522.  
  1523.     define telenet
  1524.  
  1525. A macro definition may be no longer than 128 characters.    Longer  definitions
  1526. can be accomplished by "chaining."  Example:
  1527.  
  1528.     define setup set port 1, set speed 19200, set parity even, do setup2
  1529.     define setup2 set port 2, set speed 1200, set parity none, do setup3
  1530.     define setup3 set warning on, set incomplete keep, connect
  1531.  
  1532. The SHOW MACROS command displays the value of all currently defined macros, and
  1533. tells how much space is left for further definitions.
  1534.  
  1535.  
  1536. The DO Command
  1537.  
  1538. A Kermit-MS command macro is invoked using  the  DO  command.    For  instance,
  1539. Kermit-MS  comes  with  a  predefined  macro  to allow convenient setup for IBM
  1540. mainframe line-mode communications; to invoke it, you would type 
  1541.  
  1542.     do ibm
  1543.  
  1544. The IBM macro is defined as "set timer on, set local-echo on, set parity  mark,
  1545. handshake xon, set flow none".  You can use the DEFINE command to redefine this
  1546. macro or remove the definition altogether.
  1547.  
  1548. There is no automatic way to undo the effect of a macro.  If you  need  to  ac-
  1549. complish  this  effect,  you should define another macro for that purpose.  For
  1550. instance, to undo the effect of "do ibm" so that you could connect to,  say,  a
  1551. VAX, you could:
  1552.  
  1553.     define vax set par no, set hand no, set flo x, set tim off, set loc off
  1554.  
  1555. Then  you  can  "do  ibm" whenever you want to use the IBM system, and "do vax"
  1556. whenever you want to use the VAX.
  1557.  
  1558. If you wish to view the macro expansion whenever you issue a  DO  command,  you
  1559. can SET TAKE-ECHO ON.
  1560.  
  1561.  
  1562. 1.4. Terminal Emulation
  1563.  
  1564. When  you  issue the CONNECT command, your PC acts as a terminal connected to a
  1565. remote computer through the currently selected port.  The characters  you  type
  1566. are  sent out the port, and characters that arrive at the port are displayed on
  1567. your screen, or interpreted according to whatever type  of  terminal  is  being
  1568. emulated.
  1569.  
  1570. If  you  have  not previously issued a SET PORT command, COM1 is used except on
  1571. systems (like the IBM PCjr) where some other port is the default.  If you  have
  1572. SET LOCAL-ECHO ON for the selected port, then Kermit-MS will display characters
  1573. on the screen as you type them, otherwise it will rely on the remote system  to
  1574. echo them.  XON/XOFF flow control will be done unless you have SET FLOW-CONTROL
  1575. OFF.  If you have SET PARITY to anything other than NONE,  Kermit-MS  will  add
  1576. the  appropriate  parity  to each outbound character.  While CONNECTed, you can
  1577. also communicate directly with an autodialer or "smart modem"  to  control  the
  1578. communications  line, hang it up, and the like, for instance, by typing AT com-
  1579. mands to a Hayes-like modem.
  1580.  
  1581. When you CONNECT, the program attempts to raise the DTR and RTS RS-232 signals,
  1582. and  it  takes no specific action to lower them unless you explicitly issue the
  1583. HANGUP command.
  1584.  
  1585. The IBM PC version of Kermit-MS emulates the DEC VT102 terminal by default, and
  1586. may also be instructed to emulate the DEC VT52, the Heath/Zenith-19, or no ter-
  1587. minal at all, via the SET TERMINAL command.  Emulation of each  of  these  ter-
  1588. minals  is  nearly  complete.    VT102  emulation lacks only smooth scroll, 132
  1589. column mode, and ANSI printer control.  Double-height, double-width  characters
  1590. are supported, but simulated using ordinary characters.  On color monitors, the
  1591. foreground and background colors may be  set  using  SET  TERMINAL  COLOR,  and
  1592. inverse/normal  video  display may also be selected, along with many other ter-
  1593. minal parameters.  A complete list of the commands, default key configurations,
  1594. and  escape  sequences accepted by the IBM PC Kermit terminal emulator is given
  1595. in section 1.10.
  1596.  
  1597.  
  1598. The Escape Character
  1599.  
  1600. The escape character is used to regain the attention of Kermit-MS  during  CON-
  1601. NECT,  i.e.  terminal emulation.  When you type the escape character, Kermit-MS
  1602. waits for you to follow it with a single character command.  For instance,  the
  1603. single character command "?" produces a list of available single character com-
  1604. mands.  This command is executed immediately; it may not  be  edited,  and  the
  1605. program  does  not wait for a carriage return to confirm it.  Here are the CON-
  1606. NECT escape-level commands available in Kermit-MS:
  1607.  
  1608.   ?   Help -- prints the available single-character commands.
  1609.   0   (the digit zero) Transmit a NUL (ASCII 0).
  1610.   B   Transmit a BREAK signal.
  1611.   C   Close the connection and return to Kermit-MS prompt level.
  1612.   F   File the current screen in the screen dump file.
  1613.   M   Toggle the mode line, i.e. turn it off if it is on & vice versa.
  1614.   P   Push to DOS; get back to CONNECT by typing EXIT.
  1615.   Q   Temporarily quit logging the remote session.
  1616.   R   Resume logging the remote session.
  1617.   S   Show the status of the connection.
  1618.   ^]  (or whatever you have set the escape character to be)
  1619.       Typing  the  escape character twice sends one copy of it to the connected
  1620.       host.
  1621.  
  1622. Typing any other character (except the space bar, which is the "null  command")
  1623. after  the  escape character will cause Kermit-MS to beep, but will do no harm.
  1624. The  escape  character  can  be  changed  to  something  other  than   Control-
  1625. Rightbracket by using the SET ESCAPE command.
  1626.  
  1627.  
  1628. The Mode Line
  1629.  
  1630. When  you  first  issue the CONNECT command, a message (on some systems, an in-
  1631. verse video "mode line") will display the most important facts about  the  con-
  1632. nection you've just established, so that you can quickly diagnose any problems.
  1633. Here's what the IBM PC mode line looks like:
  1634.  
  1635. +--------------------------------------------------------------------------+
  1636. | Esc-chr:^] help:^]? port:1 speed:9600 parity:odd echo:rem VT102 .... PRN |
  1637. +--------------------------------------------------------------------------+
  1638.  
  1639. This shows that the escape character is Ctrl-Rightbracket, that you would  type
  1640. Ctrl-rightbracket  followed  by question mark (^]?) to get help during CONNECT,
  1641. that you are connected on port 1 at 9600 baud with odd parity and remote  echo,
  1642. and  that  a  VT102  terminal  is  being emulated.  The four dots represent the
  1643. VT102s LEDs (they turn into the digits 1,2,3,4 when "lit") and PRN will show up
  1644. if the printer is activated (e.g. by Ctrl-PrintScreen).
  1645.  
  1646. The  mode  line occupies the 25th line of those systems that have such a thing,
  1647. and is not affected by scrolling.  When emulating a VT102 or  Heath-19,  Kermit
  1648. will  allow the host to address the 25th line directly using cursor positioning
  1649. commands.  If this happens, Kermit will remove its  mode  line  and  relinquish
  1650. control  of the 25th line to the host (as if you had typed SET MODE OFF).  When
  1651. no terminal is being emulated, the 25th line (if any) is available for  scroll-
  1652. ing.  If the mode line is disabled by an application or by the command SET MODE
  1653. OFF then the only way to revive Kermit's mode line display is to give the  com-
  1654. mand SET MODE ON.
  1655.  
  1656.  
  1657. Screen Scroll
  1658.  
  1659. On  certain  systems,  Kermit-MS provides several pages of screen memory, which
  1660. may be scrolled up and down using keys as shown in Table 1-1.
  1661.  
  1662. -------------------------------------------------------------------------------
  1663.  
  1664.  
  1665.     System    Screen Down  Line Down        Screen Up   Line Up
  1666.     IBM PC    PgUp         Ctrl-PgUp        PgDn        Ctrl-PgDn
  1667.     Rainbow   PrevScreen   Ctrl-PrevScreen  NextScreen  Ctrl-NextScreen
  1668.     HP-150    Prev         Shift-UpArrow    Next        Shift-DownArrow
  1669.     NEC APC   Uparrow      Ctrl-UpArrow     DownArrow   Ctrl-DownArrow
  1670.  
  1671.                    Table 1-1:   Kermit-MS Screen Scroll Keys
  1672.  
  1673. -------------------------------------------------------------------------------
  1674.  
  1675. There is no way to assign these functions to other keys.
  1676.  
  1677. The IBM PC also allows use of the Home key to get to the  top  of  its  display
  1678. memory  and End key to get to the bottom, and the keypad plus (+) key to toggle
  1679. the mode line on and off.
  1680.  
  1681. The Rainbow uses Shift-Next-Screen to get to the bottom of its display  memory,
  1682. but provides no key for moving directly to the top.
  1683.  
  1684.  
  1685. Screen Dump
  1686.  
  1687. The screen dump feature writes the contents of the screen to a file (KERMIT.SCN
  1688. unless another file was selected by the SET  DUMP  command)  when  the  CONNECT
  1689. escape-level  command  F is typed.  The screen dump file is appended to on each
  1690. successive screen dump, with each screen  separated  by  a  formfeed  (Ctrl-L).
  1691. This  feature may be used in conjunction with screen rollback -- a handy way to
  1692. recapture screenfuls of laboriously typed-in  text  after  a  remote  host  has
  1693. crashed without saving your work.
  1694.  
  1695. A  screen  dump  differs  from  a session log in two ways.  First, each desired
  1696. screen must be manually filed, and  second,  the  screen  dump  file  has  been
  1697. stripped of any escape sequences, whereas the session log records them.
  1698.  
  1699.  
  1700. Printer Control
  1701.  
  1702. During  terminal emulation, a locally attached printer may be controlled in the
  1703. normal manner, on most systems.  Pushing the "Print  Screen"  key  (shifted  on
  1704. some  systems)  will  cause the current contents of the screen to be printed or
  1705. spooled; holding down CTRL while depressing Print Screen will start or stop the
  1706. spooling  of  incoming characters to the printer.  On the IBM PC, the mode line
  1707. will show PRN when the printer is activated in this manner.  ^P or ^N are  sent
  1708. to  the  host during terminal emulation, and do not toggle printing, as they do
  1709. when you're talking directly to DOS.
  1710.  
  1711. CTRL-Print-Screen can be simulated with the Kermit-MS LOG PRN  and  CLOSE  com-
  1712. mands.
  1713.  
  1714.  
  1715. Key Redefinitions
  1716.  
  1717. Key  redefinitions  are  useful  for  defining  "keystroke macros" of login se-
  1718. quences, frequently issued commands, and so forth, and for setting up the  ter-
  1719. minal  for use with host resident software designed to work with terminals that
  1720. send predefined sequences from their function keys.  For instance, here's a key
  1721. redefinition  file for arranging the DEC Rainbow keyboard into the normal ASCII
  1722. keyboard layout:
  1723.  
  1724.     ; Make shift-comma send a left angle bracket
  1725.     set key scan 556
  1726.     <
  1727.     ; Shift-period sends a right angle bracket
  1728.     set key scan 558
  1729.     >
  1730.     ; Accent grave is where ESC is supposed to be
  1731.     set key scan 96
  1732.     \33
  1733.     ; Put accent grave on the ESC function key
  1734.     set key f11
  1735.     `
  1736.  
  1737. Since SET KEY is a two-line command, a special trick is necessary in  order  to
  1738. include  it in a single-line macro definition: just use a comma where you would
  1739. have typed carriage return after the first line, for instance:  
  1740.  
  1741.     define bar set key scan 261, foo
  1742.  
  1743. The CLEAR command may be used to eliminate all key redefinitions.  The SET  KEY
  1744. facility may be used provide the PC with a "meta" key for use with editors like
  1745. EMACS or TVEDIT that can use "meta characters" as commands.  A meta  key  is  a
  1746. shift  key  whose  effect  is to turn on the 8th (parity) bit of the character.
  1747. For instance, on the IBM PC  the  scan  codes  produced  by  holding  down  ALT
  1748. together with other keys can be determined using SHOW KEY, and then 8-bit ASCII
  1749. equivalents with the 8th bit turned on can be defined using  SET  KEY;  if  the
  1750. scan code produced by typing ALT-a, i.e. the letter "a" (ASCII 141, octal) with
  1751. the ALT key held down, is 2078 (decimal), you would set the META equivalent  to
  1752. 141+200=341 (octal), or "\341" in octal SET KEY notation:
  1753.  
  1754.     Kermit-MS>sho key
  1755.     Press a key: ALT-a
  1756.       Scan Code: 2078
  1757.       Definition:
  1758.     Kermit-MS>set key scan 2078
  1759.     Definition String: \341
  1760.  
  1761. Whenever you type ALT-a with this definition in effect, Kermit-MS will transmit
  1762. octal 341, rather than 141.
  1763.  
  1764.  
  1765. Summary of Kermit-MS Terminal Emulation Features
  1766.  
  1767. Table 1-2 shows the terminal emulation options for the systems  presently  sup-
  1768. ported by Kermit-MS.
  1769.  
  1770. -------------------------------------------------------------------------------
  1771.  
  1772.  
  1773.   System         EscChar   Cabilities   Terminal Service
  1774.   ACT Apricot      ^]            K      ???
  1775.   DEC Rainbow      ^]      R   P K D    VT102 firmware
  1776.   DECmate/DOS      ^]                   ???
  1777.   Generic DOS      ^]                   Depends on system
  1778.   Grid Compass     ^]                   ???
  1779.   HP-110           ^]                   Dumb terminal
  1780.   HP-150           ^]      R            HP-2623 firmware
  1781.   IBM PC,XT,AT     ^]      R M P K D    H19,VT52,VT102 emulation
  1782.   Intel 300        ^]                   ???
  1783.   NEC APC          ^]      R   P K      VT100, ADM3A firmware
  1784.   Olivetti M24     ^]      R M P K D    VT100 emulation
  1785.   Sanyo MBC550     ^]                   ???
  1786.   Wang PC          ^A                   Wang firmware
  1787.   TI Pro           ^]        M P K      VT100/Tektronix
  1788.   Victor 9000      Alt-]                VT100 and/or Tek4010
  1789.   Zenith Z100      ^]                   Heath-19 emulation
  1790.  
  1791. R=Rollback, M=Modeline, P=Printer control, K=Key redefinition, D=screen Dump
  1792.  
  1793.                Table 1-2:   Kermit-MS Terminal Emulation Options
  1794.  
  1795. -------------------------------------------------------------------------------
  1796.  
  1797.  
  1798. 1.5. Installation of Kermit-MS
  1799.  
  1800. If you already have Kermit on your PC, you can use it to obtain new versions of
  1801. Kermit-MS when they appear on the central system at your site.  If you  do  not
  1802. have  Kermit  or any other reliable file capture facility on your PC, and there
  1803. is no one from whom you can borrow a floppy  disk  to  copy  Kermit,  then  you
  1804. should  read the following instructions for initially "bootstrapping" Kermit-MS
  1805. from a mainframe where it is stored onto your microcomputer.
  1806.  
  1807. There are at least three methods of initially getting Kermit-MS onto your PC:
  1808.  
  1809.    1. Try again to find a copy on diskette.
  1810.  
  1811.    2. Use another file capture facility to get it.
  1812.  
  1813.    3. Type in and run a bootstrapping program.
  1814.  
  1815.  
  1816. 1.5.1. Try Again To Find A Kermit Disk
  1817.  
  1818. Before explaining how to bootstrap Kermit onto your PC, a  disclaimer  must  be
  1819. made.    Although  a  fair  amount  of  thought  and  time  has gone into these
  1820. procedures, they are far from error free.  If they were foolproof, there  would
  1821. be  no  need for a protocol such as Kermit.  There are many places where things
  1822. can go wrong, from something as simple as a typing mistake to something as  un-
  1823. avoidable and probably inevitable as a communications line failure.  By far the
  1824. easiest and best way to install Kermit is from a floppy disk.  Before  you  em-
  1825. bark  on  any of the following procedures it is a good idea to check once again
  1826. for a diskette to copy, even it it contains an old version of Kermit.  The time
  1827. you  spend  searching  is  likely  to be far less frustrating than the time you
  1828. spend trying to bootstrap Kermit by the methods described below.
  1829.  
  1830.  
  1831. 1.5.2. Bootstrapping From the Communication Line
  1832.  
  1833. If you can't find a diskette with Kermit on it, there  are  two  other  methods
  1834. available for bootstrapping MS-DOS Kermit onto your PC.  The first method is to
  1835. use a file capture method or other file transfer protocol to transfer the  file
  1836. to  your PC.  Some systems come supplied with facilities like this, and various
  1837. public domain or commercial packages are available.  The second method requires
  1838. you to type in your own downloading program.
  1839.  
  1840. In  either  case,  you  must transmit the file from the system where it resides
  1841. over a communication line and into your PC.  The "BOO" encoding (developed  for
  1842. MS-DOS Kermit, but usable on any system for any kind of sequential binary file)
  1843. packs 3 .EXE file bytes into 4 printable characters in the MSVxxx.BOO file, and
  1844. also  compresses  adjacent  zero  bytes (of which there may be many).  The .BOO
  1845. file contains only printable ASCII characters, to ensure that  downloading  can
  1846. take  place  regardless  of  parity or other peculariaries of the communication
  1847. channel.
  1848.  
  1849.  
  1850. Use An Existing File Capture Facility
  1851.  
  1852. In the rest of this discussion of bootstrapping, the  host-resident  boot  .BOO
  1853. file will be referred to as MSKERMIT.BOO.  In fact, the actual name will depend
  1854. on which MS-DOS system you are using --  MSVIBM.BOO  for  the  IBM  PC  or  XT,
  1855. MSVRB1.BOO for the Rainbow-100, etc.
  1856.  
  1857. Use  your  file  capture  facility,  whatever  it  may  be,  to  get  the  file
  1858. MSKERMIT.BOO onto your PC's disk, but first make sure you have enough room  for
  1859. it.    Once the file is on your disk, you must run the BASIC program MSBPCT.BAS
  1860. to decode the file back into KERMIT.EXE.  This program can be downloaded by the
  1861. same method you used with MSKERMIT.BOO.  The program looks on your current disk
  1862. and directory for the file MSKERMIT.BOO and  outputs  KERMIT.EXE  to  the  same
  1863. place.    KERMIT.EXE  is about 57K bytes, so make sure there is space for it on
  1864. your disk or else you will have to start the program over.  Since  the  program
  1865. will  take  about twenty minutes to completely translate the file you will want
  1866. to avoid running it more than once.
  1867.  
  1868. There is a more complicated variation on this technique, but it will  save  you
  1869. some time.  Download the files MSBPCT.BAS and MSBPCT.BOO.  The latter is a com-
  1870. piled C program that does the same thing that the BASIC program does, but  much
  1871. faster.    Use  the BASIC program to "un-BOO" the C program into MSBPCT.EXE and
  1872. then use the latter to decode the Kermit BOO file.
  1873.  
  1874.  
  1875. Type In Your Own Bootstrap
  1876.  
  1877. If you can't find some method for downloading  the  .BOO  file  and  the  BASIC
  1878. program,  the  second  way  of  bootstrapping  Kermit  is  to  use the programs
  1879. MSBPCB.BAS and MSBOOT.FOR to download the BOO file from your host and translate
  1880. it  directly,  "on  the  fly."  You run the program MSBOOT.FOR on your host and
  1881. then run the program MSBPCB.BAS in BASIC on your PC.  The FORTRAN program sends
  1882. the BOO to the BASIC program, which decodes it and stores it in executable form
  1883. on your current directory as KERMIT.EXE.  A  very  rudimentary  form  of  error
  1884. checking  is  done  to  allow  obviously corrupted records to be retransmitted.
  1885. Follow this procedure:
  1886.  
  1887.    1. First, you must establish a connection from your PC to the host sys-
  1888.       tem.    A  high  speed  connection  is preferable; a "clean" line is
  1889.       preferable to a noisy one.  In fact, a clean line is  essential  for
  1890.       this  procedure.  You must be able to log in to the host system over
  1891.       this connection.  If  your  PC  already  has  a  terminal  emulation
  1892.       facility, use that.  If not, you might need to put your PC next to a
  1893.       real terminal and use that for logging in, then switch the connector
  1894.       to the PC at the critical moment.  If you are using a terminal, make
  1895.       sure the terminal and PC have their communication ports set  to  the
  1896.       same  speed.    Refer to the OPEN COM command in the Microsoft BASIC
  1897.       manual.
  1898.  
  1899.    2. Ensure that the files MSBOOT.FOR and MSKERMIT.BOO are present on the
  1900.       host  system.   MSBOOT.FOR is listed below, in case you need to type
  1901.       it in.
  1902.  
  1903.    3. Get back to your PC and type in MSPCBOOT.BAS on your PC;  a  listing
  1904.       appears  below.   There is no need to type in the comments (anything
  1905.       following an apostrophe); they are only there to  clarify  what  the
  1906.       program  is  doing.    Check  very carefully for errors.  You should
  1907.       check line 70 in the program to see that it reflects  the  way  your
  1908.       system  is  actually  set  up.  If necessary, substitute the correct
  1909.       baud rate for the supplied rate of 9600, and if you  are  not  using
  1910.       COM1:  make that change as well.  If you are downloading from an IBM
  1911.       or other half-duplex mainframe, leave line 1000 as it is; otherwise,
  1912.       replace  it  by  a  RETURN statement.  If you type it in directly to
  1913.       BASIC make sure you save the program before you run it, so you won't
  1914.       have to type it in again in case of error.
  1915.  
  1916.    4. Get  back  to  your  host system and compile MSBOOT.FOR, if it needs
  1917.       compiling.  Define logical unit numbers 5 and 6 to be the  controll-
  1918.       ing  terminal,  and  logical unit 7 to be the file MSKERMIT.BOO.  On
  1919.       VAX/VMS systems, for example, use these commands:
  1920.  
  1921.           $assign sys$input for005
  1922.           $assign sys$output for006
  1923.           $assign mskermit.boo for007
  1924.  
  1925.       On a DECSYSTEM-20, do:
  1926.  
  1927.           @define 5: tty:
  1928.           @define 6: tty:
  1929.           @define 7: mskermit.boo
  1930.  
  1931.       On an IBM system under VM/CMS, do this:
  1932.  
  1933.           .filedef 5 term ( lrecl 80 recfm v
  1934.           .filedef 6 term ( lrecl 80 recfm v
  1935.           .filedef 7 disk mskermit boo ( lrecl 77 recfm f perm
  1936.  
  1937.    5. Set your host system up for downloading:
  1938.  
  1939.          - Ensure that your terminal does not automatically pause  at  the
  1940.            end  of  a  screenful of output.  For instance, on a DEC-20 you
  1941.            would issue the command "terminal no pause end-of-page".
  1942.  
  1943.          - Do whatever you can to disable messages from appearing at  your
  1944.            terminal  while these programs are running.  This would include
  1945.            messages from other users, mail notification, alarms or alerts,
  1946.            system  messages,  and  so forth.  Such messages will interfere
  1947.            with the procedure, and probably render the result useless.
  1948.  
  1949.          - You should put your host terminal  in  "local  echo"  or  "half
  1950.            duplex" mode, if possible.
  1951.  
  1952.    6. Start the MSBOOT program on your host system.
  1953.  
  1954.    7. Get  back  to the PC.  If you have been using a terminal, switch the
  1955.       connector to the PC.
  1956.  
  1957.    8. Now run the BASIC program, MSBPCB.BAS.  This procedure will take  at
  1958.       least  twenty  minutes  and possibly longer depending on line speed.
  1959.       Watch your modem and/or disk lights for reassurance  that  something
  1960.       is happening.
  1961.  
  1962. By  using one of these installation methods, you should now have a working ver-
  1963. sion of Kermit.  If you experience any problems or  quirky  behavior  with  the
  1964. program, you may need to repeat the procedure.
  1965.  
  1966. Once  you  have  Kermit-MS  on your disk, you should make the disk available to
  1967. other users for copying, so that they can be spared the tedium and  frustration
  1968. of this bootstrap procedure.
  1969.  
  1970. Here  is  a  listing of MSBPCT.BAS.  The "outdented" PRINT statements with line
  1971. numbers ending in 5 may be included if you want incoming  records  to  be  dis-
  1972. played on the screen.  You don't need to include the comments.
  1973.  
  1974. 1    'Use this BASIC program on the PC if you have the printable file
  1975. 2    'MSKERMIT.BOO already on the PC to convert it to an executable
  1976. 3    'file.  This program takes about 30 minutes to run on a PC with
  1977. 4    'floppy disks.
  1978. 5    ' Bill Catchings, June 1984
  1979. 6    ' Columbia University Center for Computing Activities
  1980.  
  1981. 10   t$ = time$                         ' Save the time.
  1982. 20   defint a-z                         ' Integer to gain some speed.
  1983. 30   n$ = chr$(0)
  1984. 40   z = asc("0")
  1985. 50   t = asc("~")-z
  1986. 60   def fnuchr%(a$)=asc(a$)-z
  1987. 70   open "MSKERMIT.BOO" for input as #1
  1988.  
  1989. 100  input#1,f$                         ' Is this the right file?
  1990. 110  if len(f$) > 20 then goto 900
  1991. 120  open f$ for output as #2
  1992. 130  print "Outputting to "+f$
  1993.  
  1994. 200  if eof(1) then goto 800            ' Exit nicely on end of file.
  1995. 210  input#1,x$                         ' Get a line.
  1996. 220  y$ = ""                            ' Clear the output buffer.
  1997. 230  goto 400
  1998.  
  1999. 300  print#2,y$;                        ' Print output buffer to file.
  2000. 310  goto 200                           ' Get another line.
  2001.  
  2002. 400  if len(x$) < 2 goto 300            ' Is the input buffer empty?
  2003. 410  a = fnuchr%(x$)
  2004. 420  if a = t then goto 700             ' Null repeat character?
  2005. 430  if len(x$) < 3 goto 300            ' Is the input buffer empty?
  2006. 440  q$=mid$(x$,2,3)                    ' Get the quadruplet to decode.
  2007. 450  x$=mid$(x$,5)
  2008. 460  b = fnuchr%(q$)
  2009. 470  q$ = mid$(q$,2)
  2010. 480  c = fnuchr%(q$)
  2011. 490  q$ = mid$(q$,2)
  2012. 500  d = fnuchr%(q$)
  2013.  
  2014. 600  y$ = y$ + chr$(((a * 4) + (b \ 16)) and 255) ' Decode the quad.
  2015. 610  y$ = y$ + chr$(((b * 16) + (c \ 4)) and 255)
  2016. 620  y$ = y$ + chr$(((c * 64) + d) and 255)
  2017. 630  goto 400                           ' Get another quad.
  2018.  
  2019. 700  x$ = mid$(x$,2)                    ' Expand the nulls.
  2020. 710  r = fnuchr%(x$)                    ' Get the number of nulls.
  2021. 715 print " Null: ",r
  2022. 720  x$ = mid$(x$,2)
  2023. 730   for i=1 to r                      ' Loop, adding nulls to string.
  2024. 740   y$ = y$ + n$
  2025. 750   next
  2026. 760  print#2,y$;                        ' Output the nulls to the file.
  2027. 770  y$ = ""                            ' Clear the output buffer.
  2028. 780  goto 400
  2029.  
  2030. 800  print "Processing complete, elapsed time: "+t$+" to "+time$
  2031. 810  print "Output in "+f$
  2032. 820  close #1,#2
  2033. 830  goto 9999
  2034.  
  2035. 900  print "?The version of the MSKERMIT.BOO file is incorrect"
  2036. 910  goto 820
  2037.  
  2038. 9999 end
  2039.  
  2040.  
  2041. Here is a listing of MSBOOT.FOR, in case you can't find it on your host system:
  2042.  
  2043. C     This Fortran program should be run on the mainframe in conjunction
  2044. C     with a Basic program (MSBPCB.BAS) on the PC to transfer
  2045. C     MSKERMIT.BOO to the PC and translate it into KERMIT.EXE.  This
  2046. C     program uses a very rudimentary technique to try to insure that
  2047. C     the characters it sends arrive correctly.  It just sends a count
  2048. C     of the number of characters sent after each line.  In this way any
  2049. C     errors of character loss or insertion will be caught.  If a
  2050. C     character is just corrupted it will not be caught.  Hopefully if
  2051. C     this happens it will be in a non-critical part of the KERMIT.EXE
  2052. C     file.  The reason a simple checksum was not used was so that this
  2053. C     program could run on machines using either EBCDIC or ASCII
  2054. C     characters.  This program should take about thirty minutes to run.
  2055. C
  2056. C     This program assumes that 5 and 6 are directed to the terminal and
  2057. C     7 is directed to the file MSKERMIT.BOO.
  2058. C
  2059. C     Bill Catchings, Columbia University Center for Computing Activities
  2060. C     June 1984 (Revised September 1984)
  2061. C
  2062.       INTEGER LINE(77), ACK(4), CHECK, OK, SPACE, COMMA
  2063.  
  2064.       WRITE(6,100)
  2065. 100   FORMAT(' Ready to transfer data, now run MSPCBOOT.BAS on the PC.')
  2066.  
  2067. C     Get characters for constants (character constants are rough in
  2068. C     some FORTRANs).
  2069.       READ (5,200) OK, SPACE, COMMA, ACK
  2070. 200   FORMAT(4A1)
  2071.       GO TO 20
  2072.  
  2073. C     Get terminal handshake.
  2074. 10    READ (5,200)ACK
  2075.  
  2076. C     Did the other side like it?  (Did they send OK?)
  2077.       IF (ACK(1) .NE. OK) GO TO 50
  2078.  
  2079. C     Yes, get new line from file.
  2080. 20    READ (7,300,END=99)LINE
  2081. 300   FORMAT(77A1)
  2082.  
  2083. C     Count the characters as some rudimentary check for noise.
  2084.       I = 1
  2085. 30    IF (LINE(I) .EQ. SPACE) GO TO 40
  2086.       I = I + 1
  2087.       GO TO 30
  2088.  
  2089. C     Put in a comma followed by the count.
  2090. 40    LINE(I) = COMMA
  2091.  
  2092. C     Write to TTY.
  2093. 50    WRITE (6,400)LINE,I-1
  2094. 400   FORMAT(' ',77A1,I2)
  2095.       GOTO 10
  2096.  
  2097. C     Send good-bye message.
  2098. 99    WRITE (6,500)
  2099. 500   FORMAT(' ',10('&'),',10')
  2100.  
  2101.       STOP
  2102.       END
  2103.  
  2104.  
  2105. 1.6. Compatibility with Older Versions of MS-DOS Kermit
  2106.  
  2107. The last monolithic (single source file) release of MS-DOS Kermit was 1.20.  To
  2108. this and earlier versions  was  added  support  for  systems  like  the  Seequa
  2109. Chameleon,  the  Tandy 2000, and others.  Eventually, support for these systems
  2110. may be integrated with the current modular version.  Meanwhile, implementations
  2111. based  on  these  old versions will have at least the following incompatibilies
  2112. from the version described here:
  2113.  
  2114.    - RECEIVE filespec is used instead of GET filespec.  There  is  no  GET
  2115.      command  in  older  versions, and no way to specify a new name for an
  2116.      incoming file.
  2117.    - No LOCAL or REMOTE commands.
  2118.    - No 8th-bit prefixing, repeat counts, CRCs or 2-character checksums.
  2119.    - No TAKE or initialization files.
  2120.    - No command macros or command line arguments.
  2121.    - No terminal session logging.
  2122.  
  2123. and others, depending on the specific version.
  2124.  
  2125. Incompatibilities between 2.28 and 2.29 include:
  2126.  
  2127.    - The SET HEATH command has been replaced with SET TERMINAL HEATH
  2128.    - The SET AUTOWRAP command has been replaced with SET TERMINAL WRAP
  2129.    - Filename completion no longer works (a consequnce of  adding  support
  2130.      for fully qualified DOS 2.0 pathnames).
  2131.  
  2132.  
  2133. 1.7. What's Missing
  2134.  
  2135. Kermit-MS  has  plenty  of  room for improvement.  Features that need to be im-
  2136. proved or added include:
  2137.  
  2138.    - A built-in facility for sending files "raw"  to  the  remote  system,
  2139.      obeying  current settings for parity, flow control, handshake, and so
  2140.      forth.
  2141.  
  2142.    - Specification of character sequences having special meaning  to  com-
  2143.      munications "black boxes" which use ASCII characters for control pur-
  2144.      poses.  Byte stuffing or character doubling may be required.
  2145.  
  2146.    - TRANSMIT command for raw file upload, obeying communication settings
  2147.    - Login scripts, integrated with Kermit commands & settings
  2148.    - DIAL command, telephone directory, support for various modems
  2149.    - Long packets, sliding windows, attribute packets
  2150.    - Tektronix or other graphics terminal emulation (except in  TI  Pro  &
  2151.      Victor)
  2152.    - ANSI printer control added to VT102 emulator
  2153.    - Redefinable keys at Kermit-MS> prompt level
  2154.    - Control over display of 8-bit characters during CONNECT
  2155.    - Pause at end of screen during local TYPE
  2156.    - A simple way to make Alt = Meta, without many many SET KEY commands
  2157.    - Piped operation a la UNIX (e.g. "compress foo.bar | kermit send")
  2158.    - Transaction file logging.
  2159.    - A  way  to  accept default values for omitted trailing fields in com-
  2160.      mands.
  2161.    - A better built-in help facility.
  2162.  
  2163.  
  2164. 1.8. Program Organization
  2165.  
  2166. Kermit-MS version 2 is composed of separate assembler source  files,  assembled
  2167. separately, and linked together.  The modules are:
  2168.  
  2169. System/Device Independent:
  2170.  
  2171. MSSKER.ASM      Main program
  2172. MSSSEN.ASM      File sender
  2173. MSSRCV.ASM      File receiver
  2174. MSSSER.ASM      Server operation
  2175. MSSFIL.ASM      File i/o
  2176. MSSCMD.ASM      Command parser
  2177. MSSTER.ASM      CONNECT command
  2178. MSSCOM.ASM      Communications port buffering & flow control
  2179. MSSSET.ASM      SET, SHOW, and STATUS commands
  2180. MSSFIN.ASM      Dummy  module  to  find  the  end  of the data segment; must be
  2181.                 linked LAST.
  2182. MSSDEF.H        Data structure definitions and equates
  2183.  
  2184. System/Device Dependent:
  2185.  
  2186. MSXxxx.ASM      System-dependent code for system xxx
  2187. MSYxxx.ASM      Terminal emulation for system xxx
  2188. MSZxxx.ASM      More terminal emulation for system xxx
  2189.  
  2190. The xxx is replaced by a 3-letter code for the particular system, e.g. IBM  for
  2191. the IBM PC family, RB1 for the Rainbow-100, etc.
  2192.  
  2193. The  modular  organization  allows  easier modification of the program, quicker
  2194. transfer of modified portions from system-to-system.  The modules are  designed
  2195. to  be  well-defined and self-contained, such that they can be easily replaced.
  2196. For instance, someone who prefers windows and mice to typing commands should be
  2197. able  replace  the command parsing module without having to worry about the ef-
  2198. fect on the other modules.
  2199.  
  2200. To assemble any of the Kermit modules, file MSSDEF.H must  be  on  the  default
  2201. disk.
  2202.  
  2203. All  the  Kermit  implementations  require  the modules MSSCMD, MSSCOM, MSSFIL,
  2204. MSSKER, MSSRCV, MSSSEN, MSSSER, MSSSET, MSSTER, MSSFIN.  MSSFIN must be  linked
  2205. last.
  2206.  
  2207. Each  particular  implementation requires at least an MSXxxx module, and, if it
  2208. is doing terminal emulation in software, also an MSYxxx and  possible  also  an
  2209. MSZxxx  module.    See the batch or make files from the source distribution for
  2210. details of exactly which modules are required for a particular implementation.
  2211.  
  2212. Once all the required object modules exist, they  may  be  linked  together  to
  2213. produce a Kermit program.  For example, on the Rainbow:
  2214.  
  2215.     A>link
  2216.  
  2217.        Microsoft Object Linker V2.00
  2218.     (C) Copyright 1982 by Microsoft Inc.
  2219.  
  2220.     Object Modules [.OBJ]: mssker msxrb1 msscom mssset msssen +
  2221.     mssrcv mssser mssfil msster msscmd mssfin
  2222.     Run File [MSSKER.EXE]: kermit
  2223.     List File [NUL.MAP]:
  2224.  
  2225.     A>
  2226.  
  2227.  
  2228. 1.9. Running Kermit on New Systems
  2229.  
  2230. You  can bring Kermit-MS to systems that are not explicitly supported in one of
  2231. two ways -- attempt to run the "generic" MS-DOS Kermit on it, or  add  explicit
  2232. code to support your system.
  2233.  
  2234. To  get  started with Kermit on a new system, try running "generic" MS-DOS Ker-
  2235. mit; in many cases, it will run as is.  The generic  version  accomplishes  all
  2236. its port and console i/o through DOS calls, and during terminal connection does
  2237. not attempt to emulate any particular kind of terminal.   In  some  cases,  the
  2238. generic version may still require some fiddling to run on a new system; for in-
  2239. stance, different systems refer to their communication ports in different  ways
  2240. --  COM1,  J1,  AUX,  etc.  The SET PORT command allows you to specify the port
  2241. using any of these device names, or using DOS file handles -- keep trying until
  2242. you find the one that works.  Generic MS-DOS Kermit will probably run no faster
  2243. than 1200 baud, and it only works with DOS 2.0 or later.
  2244.  
  2245. If you want to write code to explicitly support a new  system,  first  call  or
  2246. write Kermit Distribution at Columbia to make sure no one else is already doing
  2247. the same work.  If you're the first, then begin by reading the file MSXAAA.DOC,
  2248. provided  with the MS-DOS Kermit sources in the Kermit distribution, which is a
  2249. guide to the system dependent modules of Kermit-MS.   Then  create  new  a  new
  2250. MSXxxx.ASM  module,  and,  if  your version is also doing terminal emulation in
  2251. software, also an MSY and possibly an MSZ module.
  2252.  
  2253.  
  2254. 1.10. IBM-PC MS Kermit Terminal Emulator Summary
  2255.  
  2256.                      By Joe Doupnik, Utah State University
  2257.  
  2258. This section summarizes the IBM PC  Kermit-MS  keyboard  and  screen  operation
  2259. during emulation of H19, VT52, and VT102 terminals.  Note that spaces shown be-
  2260. tween characters of escape sequences are there for ease of reading; the  actual
  2261. sequences contain no spaces.
  2262.  
  2263.  
  2264. 1.10.1. Keyboard Layout and Characters Sent
  2265.  
  2266. Here  is  how  the  keypad  functions are assigned to the IBM keyboard function
  2267. keys:
  2268.  
  2269. ---------------------------------------------------------------------------
  2270.        Heath-19 and VT52 Keypads                     VT102 keypad
  2271.               IBM Keys                                 IBM keys
  2272.    +------+------+-------+----------+       +------+------+------+------+
  2273.    | Blue |  Red |  Grey | up arrow |       |  PF1 |  PF2 |  PF3 |  PF4 |
  2274.    |  F1  |  F2  |  F3   | up arrow |       |  F1  |  F2  |  F3  |  F4  |
  2275.    +------+------+-------+----------+       +------+------+------+------+
  2276.    |  7   |  8   |  9    |down arrow|       |  7   |  8   |  9   |  -   |
  2277.    |  F5  |  F6  |  F7   |down arrow|       |  F5  |  F6  |  F7  |  F8  |
  2278.    +------+------+-------+----------+       +------+------+------+------+
  2279.    |  4   |  5   |  6    | rgt arrow|       |  4   |  5   |  6   |  ,   |
  2280.    |  F9  |  F10 |  SF1  | rgt arrow|       |  F9  |  F10 |  SF1 |  SF2 |
  2281.    +------+------+-------+----------+       +------+------+------+------+
  2282.    |  1   |  2   |  3    |left arrow|       |  1   |  2   |  3   |  E   |
  2283.    |  SF3 |  SF4 |  SF5  |left arrow|       |  SF3 |  SF4 |  SF5 |  n  S|
  2284.    +------+------+-------+----------+       +------+------+------+  t  F|
  2285.    |  0------0   |  .    |  Enter   |       |  0------0   |  .   |  e  6|
  2286.    |  SF7        |  SF8  |  SF6     |       |   SF7       |  SF8 |  r   |
  2287.    +-------------+-------+----------+       +-------------+------+------+
  2288.  
  2289.  
  2290.                 SF1 means push Shift and F1 keys simultaneously
  2291.  
  2292. ---------------------------------------------------------------------------
  2293.  
  2294.  
  2295. Cursor Keys
  2296.  
  2297.  
  2298.                               H-19 & VT52           VT102
  2299. VT52/H19 key   IBM key        All Modes      Numeric   Application
  2300. up arrow       up arrow       ESC A          ESC [ A   ESC O A
  2301. down arrow     down arrow     ESC B          ESC [ B   ESC O B
  2302. right arrow    right arrow    ESC C          ESC [ C   ESC O C
  2303. left arrow     left arrow     ESC D          ESC [ D   ESC O D
  2304.  
  2305.  
  2306. Auxillary Keypad
  2307.  
  2308.                               Heath-19 & VT52             VT102
  2309. VT52/H19 key   IBM key        Numeric Applic.   Numeric   Applic.
  2310.  
  2311. PF1/HF7/Blue   F1             ESC P   ESC P     ESC O P   ESC O P
  2312. PF2/HF8/Red    F2             ESC Q   ESC Q     ESC O Q   ESC O Q
  2313. PF3/HF9/Grey   F3             ESC R   ESC R     ESC O R   ESC O R
  2314. PF4/HF1        F4             ESC S   ESC S     ESC O S   ESC O S
  2315. 0              SF7            ESC ? p           ESC O p
  2316. 1              SF3            ESC ? q           ESC O q
  2317. 2              SF4            ESC ? r           ESC O r
  2318. 3              SF5            ESC ? s           ESC O s
  2319. 4              F9             ESC ? t           ESC O t
  2320. 5              F10            ESC ? u           ESC O u
  2321. 6              SF1            ESC ? v           ESC O v
  2322. 7              F5             ESC ? w           ESC O w
  2323. 8              F6             ESC ? x           ESC O x
  2324. 9              F7             ESC ? y           ESC O y
  2325. - (minus)      F8             ESC ? m           ESC O m
  2326. , (comma)      SF2            ESC ? l           ESC O l (ell)
  2327. . (period)     SF8            ESC ? n           ESC O n
  2328. Enter          SF6            ESC ? M           ESC O M
  2329.  
  2330.  
  2331.         (SFn means hold down Shift key while pressing Function key n.)
  2332.  
  2333.  
  2334. Other IBM keys operational in Connect mode:
  2335.  
  2336. Del (White key) Send ASCII Del code (rubout).
  2337. Backspace       Send ASCII Del code (rubout).
  2338. Shift BackSpace Send ASCII BS code (backspace).
  2339. Keypad (Grey)+  Toggle mode line on/off (only if Mode Line is enabled).
  2340. Alt -           Toggle among Heath-19, VT52, and VT100 emulation.
  2341. Alt =           Clear screen and reset terminal emulator  to  starting  (setup)
  2342.                 state.
  2343. Home            Roll screen up (text down) to beginning of storage.
  2344. End             Roll screen down (text up) to end of storage.
  2345. PgUp            Roll screen up (back, earlier) one screen full.
  2346. PgDn            Roll screen down (forward, later) one screen full.
  2347. Ctrl-PgUp       Roll screen up one line.
  2348. Ctrl-PdDn       Roll screen down one line.
  2349.  
  2350. Control PrtSc   Toggle  on/off copying of received text to printer, "PRN" shows
  2351.                 on far right of mode line when activated.
  2352.  
  2353. Control-End     Dump image of screen  to  a  disk  file  or  device.    Default
  2354.                 filename  is  KERMIT.SCN  in the current directory. Use command
  2355.                 SET DUMP to change the filename.  Screen images are appended to
  2356.                 the file, separated by formfeeds.
  2357.  
  2358. Shift-PrtSc     Standard Print-screen, dump screen image to printer.
  2359.  
  2360. "Alt  -"  means  hold down Alt and type minus.  This switches among the various
  2361. kinds of emulation, but does  not  change  most  operating  parameters  of  the
  2362. emulator.
  2363.  
  2364.  
  2365. CONNECT Escape Commands
  2366.  
  2367. Type Kermit escape character (normally "^]"), then one of the keys below:
  2368.  
  2369.     ?   display this short list.
  2370.     0   send a null character.
  2371.     B   send a BREAK signal.
  2372.     C   close connect session & return to Kermit prompt.
  2373.     F   dump screen to filespec, default is Kermit.scn.
  2374.     M   toggle mode line on/off.
  2375.     P   push to DOS.
  2376.     Q   quit (suspend) logging.
  2377.     R   resume logging.
  2378.     S   show status.
  2379.     Kermit escape character itself: send it to the host.
  2380.  
  2381.  
  2382. 1.10.2. Responses To Characters Received By the Terminal Emulator
  2383.  
  2384. Unknown  escape  sequences  of the form "ESC char" are absorbed by the emulator
  2385. without further effect.
  2386.  
  2387. DEC VT102 functions while in ANSI (VT102) mode, unsupported features marked  by
  2388. asterisk (*):
  2389.  
  2390. Escape Seq     Mnemonic       Description of Action
  2391. ESC D          IND            Index, moves cursor down one line, can scroll
  2392. ESC E          NEL            Move cursor to start of line below, can scroll
  2393. ESC H          HTS            Set one horizontal tab at current position
  2394. ESC M          RI             Reverse Index, cursor up one line, can scroll
  2395. ESC Z          DECID          Indentify terminal (response is ESC [ ? 6 c)
  2396. ESC c          RIS            Reset terminal to initial state
  2397. ESC =          DECKPAM        Enter keypad application mode
  2398. ESC >          DECKNPNM       Enter keypad numeric mode
  2399. ESC 7          DECSC          Save cursor position and attributes
  2400. ESC 8          DECRC          Restore cursor from previously saved position
  2401. ESC # 3        DECDHL         Double height and width line, top half
  2402. ESC # 4        DECDHL         Double height and width line, bottom half
  2403. ESC # 5        DECSWL         Single height and width line
  2404. ESC # 6        DECDWL         Double width single height line
  2405. ESC # 8        DECALN         Screen alignment diagnostic - not supported
  2406. ESC [ Pn A     CUU            Cursor up Pn lines, does not scroll
  2407. ESC [ Pn B     CUD            Cursor down Pn lines, does not scroll
  2408. ESC [ Pn C     CUF            Cursor forward, stays on same line
  2409. ESC [ Pn D     CUB            Cursor backward, stays on same line
  2410. ESC [ Pn; Pn H CUP            Set cursor to row, column (same as HVP)
  2411. ESC [ Ps J     ED             Erase in display:
  2412.                                0 = cursor to end of screen, inclusive
  2413.                                1 = start of screen to cursor, inclusive
  2414.                                2 = entire screen, reset lines to single
  2415.                                    width, cursor does not move.
  2416. ESC [ Ps K     EL             Erase in line:
  2417.                                0 = cursor to end of line, inclusive
  2418.                                1 = start of line to cursor, inclusive
  2419.                                2 = entire line
  2420. ESC [ Pn L     (VT102)        Insert Pn lines preceding current line.
  2421. ESC [ Pn M     (VT102)        Delete Pn lines from current downward, incl.
  2422. ESC [ Pn P     (VT102)        Delete Pn chars from cursor to left, incl.
  2423. ESC [ Pn; Pn R CPR            Cursor report (row, column), sent by terminal
  2424.                               Example: home position yields ESC [ 1; 1 R
  2425. ESC [ Pn c     DA             Device attributes (reports ESC [ ? 6 c)
  2426. ESC [ Pn; Pn f HVP            Set cursor to row, column (same as CUP)
  2427. ESC [ Ps g     TBC            Tabs clear, 0 = at this position, 3 = all
  2428. ESC [ 20 h     LNM            Set newline mode (lf = cr/lf)
  2429. ESC [ 20 l     LNM            Reset newline mode (lf = lf)
  2430. ESC [ ? Ps;...;Ps h  SM       Set mode, see table below
  2431. ESC [ ? Ps;...;Ps l  RM       Reset mode, see table below
  2432.         Ps     mnemonic       mode           set            reset
  2433.         0                     error (ignored)
  2434.         1      DECCKM         cursor keys    application    cursor/numeric
  2435.         2      DECANM         ANSI/VT52      ANSI/VT102     VT52
  2436.         3      DECCOLM        Columns        *132 col       80 col
  2437.         4      DECSCLM        *Scrolling     smooth         jump
  2438.         4      (VT102)        Insert/Replace insert         replace
  2439.         5      DECSCNM        Screen         reverse video  normal
  2440.         6      DECOM          Origin         relative       absolute
  2441.         7      DECAWM         Autowrap       on             off
  2442.         8      DECARM         *Autorepeat    on             off
  2443.         9      DECINLM        *Interlace     on             off
  2444.         18     (VT102)        *Printer termination character
  2445.         19     (VT102)        *Printer extent
  2446. ESC [ Pn i     (VT102)        *Printer controls
  2447. ESC [ ? Pn i   (VT102)        *Printer controls
  2448. ESC [ Ps;...;Ps m  SGR        Select graphic rendition
  2449.                                0 = all attributes off (#'s 1, 4, 5, 7)
  2450.                                1 = bold, intensify foreground
  2451.                                4 = underscore (reverse video on IBM CGA)
  2452.                                5 = blink
  2453.                                7 = reverse video
  2454.                non-DEC extensions: 30-37 = foreground color = 30 + colors
  2455.                                    40-47 = background color = 40 + colors
  2456.                                    colors: 1 = red, 2 = green, 4 = blue
  2457. ESC [ Ps n     DSR            Device Status Report.
  2458.                               Response from VT100: 0 = ready, 3=malfunction.
  2459.                               Command to VT100: 5 = report status with DSR,
  2460.                               6 = report cursor position using CPR sequence.
  2461. ESC [ Ps;...;Ps q  DECLL      Load LEDs, Ps=0 means clear LED#1-4
  2462.                               Ps = 1,2,3,4 sets LED # 1,2,3,4
  2463. ESC [ Pn; Pn r DECSTBM        Set top and bottom scrolling margins
  2464. ESC [ sol x    DECREQTPARM    Request terminal parameters, see table below
  2465. ESC [ sol; par; nbits; xspeed; rspeed; clkmul; flags x
  2466.                DECREPTPARM    Reports terminal parameters
  2467.                               *sol = 0  request; term can send unsolicited
  2468.                                 reports - not supported
  2469.                               sol = 1, request; term reports only on request
  2470.                               sol = 2, this is a report (DECREPTPARM)
  2471.                               sol = 3, terminal reporting only on request
  2472.                               par = 1 none, 2 space, 3 mark, 4 odd, 5 even
  2473.                               nbits = 1 (8 bits/char), 2 (7 bits/char)
  2474.                               xspeed,rspeed = transmit & receive speed index
  2475.  0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120 correspond to speeds of
  2476.  50,75,110,134.5,150,200,300,600,1200,1800,2000,2400,3600,4800,9600,19200 baud
  2477.                               clkmul = 1 (clock rate multiplier is 16)
  2478.                               flags = 0-15 (Setup Block #5), always 0 here
  2479. ESC [ 2; Ps y  DECST          *Confidence tests - not supported
  2480.                SCS            Select character sets.
  2481. ESC ( A        SCS            G0 points to UK symbols
  2482. ESC ) A        SCS            G1 points to UK symbols
  2483. ESC ( B        SCS            G0 points to ASCII symbols
  2484. ESC ) B        SCS            G1 points to ASCII symbols
  2485. ESC ( 0        SCS            G0 points to special (line drawing) graphics
  2486. ESC ) 0        SCS            G1 points to special (line drawing) graphics
  2487. ESC ( 1        SCS            *G0 points to alt char ROM - not supported
  2488. ESC ) 1        SCS            *G1 points to alt char ROM - not supported
  2489. ESC ( 2        SCS            *G0 points to alt graphics ROM - not supported
  2490. ESC ) 2        SCS            *G1 points to alt grpahics ROM - not supported
  2491.  
  2492. ^G             BELL           Sound VT102 style beep
  2493. ^H             BS             Backspace, move cursor left one character
  2494. ^I             HT             Horizontal tab, move cursor to next tabstop
  2495. ^J             LF             Linefeed, move cursor down one line
  2496. ^L             FF             Formfeed, treated as a line feed
  2497. ^M             CR             Carriage return, move cursor to col 1
  2498. ^N             SO             Invoke usage of G1 character set
  2499. ^O             SI             Invoke usage of G0 character set
  2500.  
  2501. Other extensions:
  2502. ESC [ ? 6 h  ESC [ 25; Pc f   VT52/VT100 move cursor to 25th line.
  2503. ESC [ ? 6 h  ESC [ 25; Pc H   VT52/VT100 move cursor to 25th line.
  2504.                               (These will disable Kermit's own status line.)
  2505. ESC * char                    VT200 series graphics command, ignored.
  2506.  
  2507.  
  2508. 1.10.3. DEC VT102 functions while in VT52 mode
  2509.  
  2510. Escape seq                    Description of action
  2511. ESC A                         Cursor up
  2512. ESC B                         Cursor down
  2513. ESC C                         Cursor right
  2514. ESC D                         Cursor left
  2515. ESC F                         Enter graphics mode
  2516. ESC G                         Exit graphics mode
  2517. ESC H                         Cursor home
  2518. ESC I                         Reverse line feed
  2519. ESC J                         Erase to end of screen
  2520. ESC K                         Erase to end of line
  2521. ESC Y row column              Direct cursor address, offset from space
  2522. ESC Z                         Identify (response is ESC / Z)
  2523. ESC =                         Enter alternate keypad mode
  2524. ESC >                         Exit alternate keypad mode
  2525. ESC <                         Enter ANSI mode (changes to VT102)
  2526.  
  2527.  
  2528. 1.10.4. Heath-19 functions while in non-ANSI mode
  2529.  
  2530. Escape seq     Mnemonic       Description of action
  2531. ESC A          HCUU           Cursor Up
  2532. ESC B          HCUD           Cursor Down
  2533. ESC C          HCUF           Cursor Forward, can jump to next line
  2534. ESC D          HCUB           Cursor Backward, can jump to previous line
  2535. ESC E          HCD            Clear display
  2536. ESC F          HEGM           Enter Graphics mode
  2537. ESC G          HXGM           Exit Graphic mode
  2538. ESC H          HCUH           Cursor Home
  2539. ESC I          HRI            Reverse Index
  2540. ESC J          HEOP           Erase to end of page
  2541. ESC K          HEOL           Erase to end of line
  2542. ESC L          HIL            Insert line
  2543. ESC M          HDL            Delete line
  2544. ESC N          HDCH           Delete character
  2545. ESC O          HERM           Exit Insert Char mode
  2546. ESC Y row col  HDCA           Direct cursor addressing, offset from space
  2547. ESC Z          HID            Identify (responds ESC / K  which is a VT52)
  2548. ESC b          HBD            Erase Beginning of display
  2549. ESC j          HSCP           Save cursor position
  2550. ESC k          HRCP           Set cursor to saved position
  2551. ESC l          HEL            Erase entire line
  2552. ESC n          HCPR           Cursor Position Report request
  2553. ESC o          HEBL           Erase beginning of line
  2554. ESC p          HERV           Enter Reverse Video mode
  2555. ESC q          HXRV           Exit Reverse Video mode
  2556. ESC r Bn       HMBR           *Modify baud rate - not supported
  2557. ESC t          HEKS           *Enter Keypad shifted mode, not supported
  2558. ESC u          HXKS           *Exit Keypad shifted mode, not supported
  2559. ESC v          HEWA           Wrap around at end of line
  2560. ESC w          HXWA           Discard at end of line
  2561. ESC x Ps       HSM            Set Mode. See table below
  2562. ESC y Ps       HRM            Reset Mode. See table below
  2563.  
  2564.         Ps     Mnemonic       Mode           Set            Reset
  2565.         1      HSM/HRM        25th line      enabled        disabled
  2566.         2                     *keyclick      off            on
  2567.         3                     *holdscreen    enabled        disabled
  2568.         4                     cursor type    block          underl.
  2569.         5                     *cursor on/off on             off
  2570.         6                     *keypad shifted  shifted      unshiftd
  2571.         7                     alt app keypad  enabled       disabled
  2572.         8                     *linefeed      CR=CRLF        just CR
  2573.         9                     newline mode   enabled        disabled
  2574.  
  2575. ESC z          HRAM           Reset to power-up configuration
  2576. ESC =          HAKM           Enter Alternate Keypad mode
  2577. ESC >          HXAM           Exit Alternate Keypad mode
  2578. ESC <          HEAM           Enter ANSI mode (ESC [ stuff)
  2579. ESC @          HEIM           Enter Insert Char mode
  2580. ESC [          HEHS           *Enter Hold Screen mode, not supported
  2581. ESC \          HXHS           *Exit Hold Screen mode, not supported
  2582. ESC { and }    HEK, HDK       *Keyboard enable/disable, not supported
  2583. ESC ]          HX25           *Transmit 25th line, not supported
  2584. ESC #          HXMP           *Transmit page, not supported
  2585.  
  2586.  
  2587. Heath-19 functions while in ANSI mode
  2588.  
  2589. Escape Seq     Mnenonic       Description of Action
  2590. ESC [ s        PSCP           Save cursor position & attributes
  2591. ESC [ u        PRCP           Restore cursor position & attributes
  2592. ESC [ z        PRAM           Reset to power-up configuration
  2593. ESC [ 2 J      ED             Erase entire screen but do not move cursor;
  2594.                               regular Heath-19 moves cursor to Home.
  2595. ESC [ ? 2 h    PEHM           Revert to normal Heath-19 non-ANSI mode
  2596. ESC [ > Ps h   SM             Same as ESC x Ps
  2597. ESC [ > Ps l   RM             Same as ESC y Ps
  2598.  
  2599. Plus most of the ANSI escape sequences listed for the VT102.
  2600.  
  2601. [End of MSKERM.DOC]